Compare commits

...
4 Commits
6 changed files with 26 additions and 73 deletions
+2 -2
View File
@@ -9,8 +9,8 @@ local BeamData = {
SIMUL_VIEW_DIR = 2, -- direzione di vista predefinita per la simulazione (1=NW, 2=SW, 3=NE, 4=SE) SIMUL_VIEW_DIR = 2, -- direzione di vista predefinita per la simulazione (1=NW, 2=SW, 3=NE, 4=SE)
MIN_WIDTH = 40, -- larghezza minima del grezzo MIN_WIDTH = 40, -- larghezza minima del grezzo
MIN_HEIGHT = 40, -- altezza minima del grezzo MIN_HEIGHT = 40, -- altezza minima del grezzo
MAX_WIDTH = 1250, -- larghezza massima del grezzo MAX_WIDTH = 1300, -- larghezza massima del grezzo
MAX_HEIGHT = 400, -- altezza massima del grezzo MAX_HEIGHT = 600, -- altezza massima del grezzo
LEN_SHORT_PART = 1200, -- lunghezza massima pezzo piccolo LEN_SHORT_PART = 1200, -- lunghezza massima pezzo piccolo
MAX_RAW = 20000, -- massima lunghezza grezzo (deve essere minore di LenTable - RAW_OFFSET) MAX_RAW = 20000, -- massima lunghezza grezzo (deve essere minore di LenTable - RAW_OFFSET)
STD_RAW = 14000, -- lunghezza standard della barra di grezzo STD_RAW = 14000, -- lunghezza standard della barra di grezzo
+1 -1
View File
@@ -1925,7 +1925,7 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut)
EmitResetMachining() EmitResetMachining()
end end
-- se testa 1 -- se testa 1
if EMT.HEAD ~= 'H21' and EMT.HEAD ~= 'H22' then if EMT.HEAD ~= 'H21' then
-- posizioni sicure -- posizioni sicure
local dMaxZ1 = EgtGetAxisMax( 'Z1') local dMaxZ1 = EgtGetAxisMax( 'Z1')
local dSafeX1 = EgtGetAxisHomePos( 'X1') local dSafeX1 = EgtGetAxisHomePos( 'X1')
+4 -23
View File
@@ -408,19 +408,6 @@ function OnSimulToolSelect( dPosA)
-- Imposto visualizzazione -- Imposto visualizzazione
EgtSetMode( EgtGetHeadId( EMT.HEAD) or GDB_ID.NULL, GDB_MD.STD) EgtSetMode( EgtGetHeadId( EMT.HEAD) or GDB_ID.NULL, GDB_MD.STD)
end end
-- se lama su aggregato da sotto, imposto subito angolo scelto per asse virtuale A
if EMT.HEAD == 'H22' then
-- valore dell'asse virtuale
dPosA = dPosA or GetNextSawingVirtualAxis( EMT.MCHID)
-- imposto il valore di A
EgtSetAxisPos( 'A2', dPosA)
-- imposto home dell'asse C1 (A=0 -> T101, A=90 -> T104)
local MyParkSawC2 = GetSawCHomeFromVirtualAxis( dPosA)
EmtModifyAxisHome( 'C2', MyParkSawC2)
EgtSetAxisPos( 'C2', MyParkSawC2)
-- Imposto visualizzazione
EgtSetMode( EgtGetHeadId( EMT.HEAD) or GDB_ID.NULL, GDB_MD.STD)
end
-- carico utensile, con breve pausa -- carico utensile, con breve pausa
EgtPause( 100) EgtPause( 100)
EgtOutText( '') EgtOutText( '')
@@ -1662,13 +1649,7 @@ function LoadFirstTool( nHSet, sTcPosDef)
sHead = EgtIf( sTcPos == 'T1', 'H12', 'H11') sHead = EgtIf( sTcPos == 'T1', 'H12', 'H11')
end end
else else
-- lama su aggregato da sotto sHead = 'H21'
if sTcPos == 'T201' then
sHead = 'H22'
-- utensili standard da sotto
else
sHead = 'H21'
end
end end
end end
end end
@@ -2092,7 +2073,7 @@ end
function GetHeadSet( sHead) function GetHeadSet( sHead)
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H14' or sHead == 'H16' then if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H14' or sHead == 'H16' then
return 1 return 1
elseif sHead == 'H21' or sHead == 'H22' then elseif sHead == 'H21' then
return 2 return 2
else else
return 0 return 0
@@ -2223,7 +2204,7 @@ function GetNextSawingVirtualAxis( MchId)
NextMchId = EgtGetNextActiveOperation( NextMchId) NextMchId = EgtGetNextActiveOperation( NextMchId)
end end
-- verifico sia un taglio o fresatura con lama su aggregato da sotto -- verifico sia un taglio o fresatura con lama su aggregato da sotto
if EgtGetOperationType( NextMchId) ~= MCH_OY.MILLING and EgtGetOperationType( NextMchId) ~= MCH_OY.SAWING and EMT.HEAD ~= 'H22' then if EgtGetOperationType( NextMchId) ~= MCH_OY.MILLING and EgtGetOperationType( NextMchId) ~= MCH_OY.SAWING then
return nil return nil
end end
-- la imposto come lavorazione corrente -- la imposto come lavorazione corrente
@@ -2252,7 +2233,7 @@ end
function RollerParkingNeeded( sHead, dAng1p, dAng2p, dAng1, dAng2) function RollerParkingNeeded( sHead, dAng1p, dAng2p, dAng1, dAng2)
if sHead == 'H11' or sHead == 'H14' or sHead == 'H12' or sHead == 'H13' or sHead == 'H16' then if sHead == 'H11' or sHead == 'H14' or sHead == 'H12' or sHead == 'H13' or sHead == 'H16' then
return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1 % 180.0) > 1)) return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1 % 180.0) > 1))
elseif sHead == 'H21' or sHead == 'H22' then elseif sHead == 'H21' then
return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1 % 180.0) > 1)) return ( abs( dAng1 - dAng1p) > 1 or ( abs( dAng2 - dAng2p) > 1 and abs( dAng1 % 180.0) > 1))
end end
end end
Binary file not shown.
+7 -33
View File
@@ -1,12 +1,13 @@
-- Descrizione macchina Essetre-PF1250MAX by EgalWare s.r.l. 2023/12/07 -- Descrizione macchina Essetre-PF1250MAX by EgalWare s.r.l. 2023/12/07
-- 2023/12/07 ver 2.5l1 Prima versione. Derivata da PF1250 ver 2.5l4 -- 2023/12/07 ver 2.5l1 Prima versione. Derivata da PF1250 ver 2.5l4
-- 2023/12/15 ver 2.5l2 Corretti vari offset in simulazione
-- Intestazioni -- Intestazioni
require( 'EmtGenerator') require( 'EmtGenerator')
EgtEnableDebug( false) EgtEnableDebug( false)
PP_VER = '2.5l1' PP_VER = '2.5l2'
MIN_MACH_VER = '2.5k1' MIN_MACH_VER = '2.5k1'
EgtOutLog ( '** Essetre-PF1500rl '..PP_VER..' (MinMach '.. MIN_MACH_VER ..') **', 1) EgtOutLog ( '** Essetre-PF1500rl '..PP_VER..' (MinMach '.. MIN_MACH_VER ..') **', 1)
@@ -62,7 +63,7 @@ SawC2Offs = 0
SawB2Offs = 0 SawB2Offs = 0
MinX1 = 0 MinX1 = 0
MaxX1 = 3300 MaxX1 = 3300
MinZ1 = -1550 MinZ1 = -1850
MaxZ1 = -100 MaxZ1 = -100
MinC1 = -275 MinC1 = -275
MaxC1 = 275 MaxC1 = 275
@@ -109,12 +110,12 @@ ParkSawB2 = 0
MinDistToolX1X2 = 40 MinDistToolX1X2 = 40
TurnerOffs = 120.0 TurnerOffs = 120.0
AggLoad = 50 AggLoad = 50
DeltaTabY = 2750 DeltaTabY = 2550
DeltaTabZ = -1428 + MillOffs -- per TPA : -1128.0 + MillOffs -- per NUM : -1258 DeltaTabZ = -1428 + MillOffs -- per TPA : -1128.0 + MillOffs -- per NUM : -1258
DeltaRulliTraveZ = -1203 DeltaRulliTraveZ = -1203
DimTabY = 1400 DimTabY = 1400
DimTabX = 24000 DimTabX = 24000
Delta2TabY = -985.9 Delta2TabY = -1185.9
Delta2TabZ = 393 - Mill2Offs -- per TPA : 378.0 - Mill2Offs -- per NUM : 223 Delta2TabZ = 393 - Mill2Offs -- per TPA : 378.0 - Mill2Offs -- per NUM : 223
Head2X = 0 Head2X = 0
Head2Y = DeltaTabY - Delta2TabY Head2Y = DeltaTabY - Delta2TabY
@@ -126,7 +127,6 @@ Tc2Active = true -- magazzino prima sega a caten
SecondSaw = true -- seconda lama su aggregato su TC3 presente SecondSaw = true -- seconda lama su aggregato su TC3 presente
SecondChain = true -- magazzino seconda sega a catena SecondChain = true -- magazzino seconda sega a catena
TcSpecialTools = true -- magarzzino per utensili speciali. In genere truciolatore TcSpecialTools = true -- magarzzino per utensili speciali. In genere truciolatore
TcAggreBladeUnder = true -- lama su aggregato per testa da sotto
-- Aggiornamento con dati da TechnoEssetre7 -- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-PF1250.data" local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-PF1250.data"
@@ -228,7 +228,7 @@ local sBaseAux = {'BASE/SOLID', 'BASE/CONVOYER', 'BASE/COLLISION', 'BASE/TC1', '
if Tc2Active then table.insert( sBaseAux, 5, 'BASE/TC2') end if Tc2Active then table.insert( sBaseAux, 5, 'BASE/TC2') end
if TcSpecialTools then table.insert( sBaseAux, 'BASE/TC4') end if TcSpecialTools then table.insert( sBaseAux, 'BASE/TC4') end
if SecondChain then table.insert( sBaseAux, 'BASE/TC5') end if SecondChain then table.insert( sBaseAux, 'BASE/TC5') end
if TcAggreBladeUnder then table.insert( sBaseAux, 'BASE/TCS') end
local BaseId = EmtBase { local BaseId = EmtBase {
Name = 'Base', Name = 'Base',
Geo = 'BASE/GEO', Geo = 'BASE/GEO',
@@ -450,23 +450,6 @@ local H21Id = EmtHead {
Geo = 'H21_HEAD/GEO'} Geo = 'H21_HEAD/GEO'}
EgtSetInfo( H21Id, 'ABOVE', '0') EgtSetInfo( H21Id, 'ABOVE', '0')
EgtSetInfo( H21Id, 'ZHOMEDOWN', '1') EgtSetInfo( H21Id, 'ZHOMEDOWN', '1')
-- Lama
if TcAggreBladeUnder then
local H22Id = EmtHead {
Name = 'H22',
Parent = 'A2',
HSet = 'H21',
Type = MCH_HT.STD,
Pos = Point3d( SawUnderOffsX+Head2X, SawUnderOffsY+Head2Y, SawUnderOffsZ+Head2Z),
TDir = Vector3d( 0, sin( SawUnderB2Offs), -cos( SawUnderB2Offs)),
ADir = Y_AX(),
Rot1W = 0.5,
Rot2Stroke = { MinB2b, MaxB2b},
OthColl = {'B2/SOLID', 'C2/SOLID'},
Geo = 'H22_HEAD/GEO'}
EgtSetInfo( H22Id, 'ZEXTRA', '160,60')
EgtSetInfo( H22Id, 'ZMAXONROT', '1,190')
end
-- *** Carrelli *** -- *** Carrelli ***
-- Morse -- Morse
local Y1Id = EmtAxis { local Y1Id = EmtAxis {
@@ -781,14 +764,6 @@ EmtTcPos {
TDir = -X_AX(), TDir = -X_AX(),
ADir = Z_AX(), ADir = Z_AX(),
Geo = 'BASE/T111'} Geo = 'BASE/T111'}
local ptTcS = Point3d( -1, -22.3, -1723 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos {
Name = 'T201',
Parent = 'Base',
Pos = ptTcS + EgtIf( TcAggreBladeUnder, Vector3d( 0, SawUnderOffsY, SawUnderOffsZ), V_NULL()),
TDir = -Z_AX(),
ADir = Y_AX(),
Geo = 'BASE/T201'}
local ptTcR = Point3d( -0.5, 4115, -1871.15 + ( DeltaTabZ - DeltaRulliTraveZ + 55)) local ptTcR = Point3d( -0.5, 4115, -1871.15 + ( DeltaTabZ - DeltaRulliTraveZ + 55))
EmtTcPos { EmtTcPos {
Name = 'T220', Name = 'T220',
@@ -879,9 +854,8 @@ EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC3') or GDB_ID.NULL, vtMovB, GDB_RT.G
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC4') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB) EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC4') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC5') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB) EgtMove( EgtGetFirstNameInGroup( BaseId, 'TC5') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCR') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB) EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCR') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( BaseId, 'TCS') or GDB_ID.NULL, vtMovB, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X1Id, 'SOLID'), vtMovB, GDB_RT.GLOB) EgtMove( EgtGetFirstNameInGroup( X1Id, 'SOLID'), vtMovB, GDB_RT.GLOB)
local vtMove = Vector3d( 0, ( DeltaTabY - 2750.0), ( DeltaTabZ + 1258.0)) local vtMove = Vector3d( 0, ( DeltaTabY - 2550.0), ( DeltaTabZ + 1258.0))
EgtMove( EgtGetFirstNameInGroup( BaseId, 'CONVOYER'), vtMove, GDB_RT.GLOB) EgtMove( EgtGetFirstNameInGroup( BaseId, 'CONVOYER'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( Y1Id, 'SOLID'), vtMove, GDB_RT.GLOB) EgtMove( EgtGetFirstNameInGroup( Y1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PY1Id, 'SOLID'), vtMove, GDB_RT.GLOB) EgtMove( EgtGetFirstNameInGroup( PY1Id, 'SOLID'), vtMove, GDB_RT.GLOB)
+12 -14
View File
@@ -33,9 +33,8 @@ local bTc2Active = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TC2') ~= ni
local SecondSaw = ( EgtGetHeadId( 'H16') ~= nil) local SecondSaw = ( EgtGetHeadId( 'H16') ~= nil)
local SecondChain = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TC5') ~= nil) local SecondChain = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TC5') ~= nil)
local TcSpecialTools = ( EgtGetHeadId( 'H14') ~= nil) local TcSpecialTools = ( EgtGetHeadId( 'H14') ~= nil)
local TcAggreBladeUnder = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TCS') ~= nil)
local bFullOpt = bTc2Active and SecondSaw and SecondChain and TcSpecialTools and TcAggreBladeUnder -- se ha tutti gli optional attivati local bFullOpt = bTc2Active and SecondSaw and SecondChain and TcSpecialTools -- se ha tutti gli optional attivati
if bFullOpt then if bFullOpt then
PositionTable = {{Pos = "Pos1", TcPos = "T1", Head = "H12", Group = "G1"}, -- TC 1 PositionTable = {{Pos = "Pos1", TcPos = "T1", Head = "H12", Group = "G1"}, -- TC 1
{Pos = "Pos2", TcPos = "T2", Head = "H11", Group = "G1"}, {Pos = "Pos2", TcPos = "T2", Head = "H11", Group = "G1"},
@@ -63,18 +62,17 @@ if bFullOpt then
{Pos = "Pos24", TcPos = "T28", Head = "H11", Group = "G3"}, {Pos = "Pos24", TcPos = "T28", Head = "H11", Group = "G3"},
{Pos = "Pos25", TcPos = "T29", Head = "H11", Group = "G3"}, {Pos = "Pos25", TcPos = "T29", Head = "H11", Group = "G3"},
{Pos = "Pos26", TcPos = "T30", Head = "H11", Group = "G3"}, {Pos = "Pos26", TcPos = "T30", Head = "H11", Group = "G3"},
{Pos = "Pos27", TcPos = "T201", Head = "H22", Group = "G4"}, -- lama con aggregatop da sotto {Pos = "Pos27", TcPos = "T220", Head = "H21", Group = "G4"}, -- TC margherita
{Pos = "Pos28", TcPos = "T220", Head = "H21", Group = "G4"}, -- TC margherita {Pos = "Pos28", TcPos = "T221", Head = "H21", Group = "G4"},
{Pos = "Pos29", TcPos = "T221", Head = "H21", Group = "G4"}, {Pos = "Pos29", TcPos = "T222", Head = "H21", Group = "G4"},
{Pos = "Pos30", TcPos = "T222", Head = "H21", Group = "G4"}, {Pos = "Pos30", TcPos = "T223", Head = "H21", Group = "G4"},
{Pos = "Pos31", TcPos = "T223", Head = "H21", Group = "G4"}, {Pos = "Pos31", TcPos = "T224", Head = "H21", Group = "G4"},
{Pos = "Pos32", TcPos = "T224", Head = "H21", Group = "G4"}, {Pos = "Pos32", TcPos = "T225", Head = "H21", Group = "G4"},
{Pos = "Pos33", TcPos = "T225", Head = "H21", Group = "G4"}, {Pos = "Pos33", TcPos = "T226", Head = "H21", Group = "G4"},
{Pos = "Pos34", TcPos = "T226", Head = "H21", Group = "G4"}, {Pos = "Pos34", TcPos = "T227", Head = "H21", Group = "G4"},
{Pos = "Pos35", TcPos = "T227", Head = "H21", Group = "G4"}, {Pos = "Pos35", TcPos = "T228", Head = "H21", Group = "G4"},
{Pos = "Pos36", TcPos = "T228", Head = "H21", Group = "G4"}, {Pos = "Pos36", TcPos = "T229", Head = "H21", Group = "G4"},
{Pos = "Pos37", TcPos = "T229", Head = "H21", Group = "G4"}, {Pos = "Pos37", TcPos = "T230", Head = "H21", Group = "G4"}}
{Pos = "Pos38", TcPos = "T230", Head = "H21", Group = "G4"}}
elseif bTc2Active then elseif bTc2Active then
PositionTable = {{Pos = "Pos1", TcPos = "T1", Head = "H12", Group = "G1"}, PositionTable = {{Pos = "Pos1", TcPos = "T1", Head = "H12", Group = "G1"},
{Pos = "Pos2", TcPos = "T3", Head = "H11", Group = "G1"}, {Pos = "Pos2", TcPos = "T3", Head = "H11", Group = "G1"},