Compare commits

...

73 Commits

Author SHA1 Message Date
andrea.villa 635457269e - Piccola correzione per capire se testa 3 presente
- In caso di lavorazione successiva alla prima, rivisto primo posizionamento alla quota Z di lavoro se precedentemente spostati a quota rotazione assi rotanti
2024-10-25 13:00:57 +02:00
andrea.villa 43b441d069 Merge remote-tracking branch 'origin/develop' 2024-10-23 10:16:56 +02:00
andrea.villa 8a30ac309e - Per movimento a ZMAX si considera utensile attuale o precedente
- Post con gestione 3 testa dedicata lama
2024-10-23 10:16:37 +02:00
andrea.villa 63bba61c19 Aggiunto parametro ParkTc1X1 in MLDE per simulazione quota parcheggio Testa 1 su TC1 2024-10-16 12:01:10 +02:00
andrea.villa 92d983451c Merge remote-tracking branch 'origin/main' into develop 2024-10-01 08:21:58 +02:00
andrea.villa b2ce94eeb3 Merge remote-tracking branch 'origin/develop' 2024-10-01 08:21:32 +02:00
andrea.villa 059e150bb1 Commit per versione 2024-10-01 08:21:18 +02:00
andrea.villa 7c81481da4 Per lavorazione in doppio: messaggio bloccante in caso di extra-corsa durante un movimento standard su piano generico della lavorazione. 2024-09-23 12:42:50 +02:00
andrea.villa 272705acf2 Aggiunta gestione solidi collisione per TC verticali e TC rotante sotto 2024-09-16 12:30:53 +02:00
andrea.villa 709c6ebccf Migliorato calcolo chiusura paratia rulli con aggiornamento lunghezza della barra in caso di ultimo taglio e grezzo residuo in coda 2024-09-12 13:02:26 +02:00
andrea.villa ab03fa02c1 Merge remote-tracking branch 'origin/main' into develop 2024-09-10 10:24:39 +02:00
andrea.villa 4e60812c29 Merge remote-tracking branch 'origin/develop' 2024-09-10 10:24:25 +02:00
andrea.villa 3c8d626277 Commit per versione 2024-09-10 10:24:15 +02:00
andrea.villa f90003d85a se diametro utensile più del truciolatore standard grande, non si preseleziona 2024-09-10 10:23:09 +02:00
andrea.villa 5cc80c6ce7 Merge remote-tracking branch 'origin/main' into develop 2024-08-28 10:00:24 +02:00
andrea.villa 2e2e56b86b Merge branch 'develop' 2024-08-28 10:00:05 +02:00
andrea.villa 344c135410 Primo movimento testa sotto in posizione rotazione assi rotanti dopo eventuale apertura rulli 2024-08-28 09:59:49 +02:00
andrea.villa e4b72f36de Quando si aprono i rulli, se la trave non può seguire i rulli perchè la pinza andrebbe in extra-corsa, si sposta comunque la pinza fino al massimo della sua corsa. 2024-08-07 13:14:34 +02:00
andrea.villa 6cd8cc0aa6 Merge remote-tracking branch 'origin/main' into develop 2024-08-07 09:18:11 +02:00
andrea.villa abeea33183 Corretto chiamata file TPA con nuovo nome 2024-08-07 09:18:00 +02:00
andrea.villa dbc72d38db Merge remote-tracking branch 'origin/main' into develop 2024-08-07 09:09:16 +02:00
andrea.villa 6bef01fec7 Merge remote-tracking branch 'origin/develop' 2024-08-07 09:09:04 +02:00
andrea.villa ae9de373fb Commit per versione 2024-08-07 09:08:49 +02:00
andrea.villa f5d4c8d8b7 - Rinominato file da "Common-" a "Common_" 2024-08-02 09:33:42 +02:00
andrea.villa c577ddf692 Ridotto limite minimo intervallo di pinzaggio 2024-07-30 14:37:49 +02:00
andrea.villa f750918c0e Migliorata gestione riposizionamenti fatta con la 2.6g1 2024-07-30 12:17:11 +02:00
andrea.villa 9fdaeee8d1 Viene ripristinato il tipo di arco corretto 2024-07-29 09:59:21 +02:00
andrea.villa 0041fea1b2 Gestione creazione piano generico in caso il primo movimento della lavorazione sia un arco 2024-07-29 09:18:28 +02:00
andrea.villa c3ca7da19c Merge remote-tracking branch 'origin/main' into develop 2024-07-24 13:05:04 +02:00
andrea.villa aea3cf168f Per OnSetHead chiamata da simulazione, aggiunta lettura TOTDIAM. Serve per limitare corse assi testa sotto 2024-07-24 13:04:46 +02:00
andrea.villa aa20eb6959 Merge branch 'main' into develop 2024-07-23 13:13:09 +02:00
andrea.villa 118298e841 Merge remote-tracking branch 'origin/develop' 2024-07-23 13:12:50 +02:00
andrea.villa ffeedc5fd6 Corretta ultima modifica per controllo collisioni testa non utilizzata. Trovava collisioni in lavorazioni in doppio. 2024-07-23 13:12:38 +02:00
andrea.villa 7686361567 Merge remote-tracking branch 'origin/main' into develop 2024-07-22 15:05:23 +02:00
andrea.villa fd1c2d2a21 Piccola correzione controllo collisione 2024-07-22 15:05:06 +02:00
andrea.villa 6ac9b67b8d Merge branch 'main' into develop 2024-07-22 15:00:54 +02:00
andrea.villa 1c1124ac39 Merge remote-tracking branch 'origin/develop' 2024-07-22 15:00:47 +02:00
andrea.villa ce46627885 In caso di grezzo piuttosto piccolo, concesso pinzaggio fino al massimo possibile, oltre al calcolo con coefficienti 2024-07-22 14:53:37 +02:00
andrea.villa 8755104f2f In calcolo pinzaggio al carico, si aggiunge anche alla quota massima l'offset aggiuntivo. 2024-07-22 12:52:02 +02:00
andrea.villa f5669d9e62 Si aggiunge al controllo collisioni anche Tool e ToolHolder della testa non utilizzata 2024-07-19 16:36:02 +02:00
andrea.villa 6560c27fed Merge remote-tracking branch 'origin/main' into develop 2024-07-12 16:21:36 +02:00
andrea.villa 962ea6f461 Corretto movimento testa sotto che andava in collisione tra una lavorazione e la successiva se tra le due c'era un riposizionamento pinze. 2024-07-12 16:21:20 +02:00
andrea.villa a4f8a81186 Merge branch 'main' into develop 2024-07-08 12:38:36 +02:00
andrea.villa e4704572da Corretto movimento che pinzava nel vuoto durante riposizionamento 2024-07-08 12:38:25 +02:00
andrea.villa e1c20e5152 Merge branch 'main' into develop 2024-06-06 16:33:43 +02:00
andrea.villa d3684186c7 Merge branch 'develop' 2024-06-06 16:33:27 +02:00
andrea.villa 69e4539fad Quando si va a ZMAX, si azzerano tutte le coordinate ".pp" 2024-06-06 16:33:18 +02:00
andrea.villa 7d563d06ab Merge branch 'main' into develop 2024-06-03 12:22:42 +02:00
andrea.villa e6fe268062 Merge branch 'develop' 2024-06-03 12:22:37 +02:00
andrea.villa 3854c6a24c Versione 2.6f1 2024-06-03 12:22:26 +02:00
andrea.villa 25bcad240a Migliorata gestione approccio al pezzo con lama aggregato da sotto. Va al minimo in X solo se necessario. 2024-05-29 12:17:36 +02:00
andrea.villa db5230a402 Merge branch 'main' into develop 2024-05-28 09:57:54 +02:00
andrea.villa 7ec4bfd76e Corretta versione 2024-05-28 09:57:43 +02:00
andrea.villa 2d97e2cb51 Merge branch 'develop' 2024-05-28 09:56:55 +02:00
andrea.villa d66abca2e7 - Ripristinato controllo extra-corsa per testa 2
- Corretto movimento testa sotto su prima lavorazione
2024-05-28 09:56:44 +02:00
andrea.villa b65e6f805d Aggiunta possibilità di scrivere nome utensile doppio anche in lavorazione con parametro "TOOLDOUBLE". Note sulla lavorazione hanno precedenza su note utensile. 2024-05-24 11:43:39 +02:00
andrea.villa e18023d094 Merge branch 'main' into develop 2024-05-23 14:44:05 +02:00
andrea.villa bd96eb55e2 Merge branch 'develop' 2024-05-23 14:43:57 +02:00
andrea.villa 73cdbd2df5 Se lavorazione con testa 2 e stesso utensile, piccola correzione che manda a parcheggio se cambiano assi rotanti solo se si trova a ZMAX 2024-05-23 14:43:47 +02:00
andrea.villa b28c999198 Corretta lettura e salvataggio coordinala asse L2 con coordinate rispetto origine. Prima erano locali e sbagliava alcuni calcoli 2024-05-16 15:09:21 +02:00
andrea.villa 44def6c43e Controllo extra-corsa per testa 2 in caso di lavorazioni in doppio in Y 2024-05-15 16:19:03 +02:00
andrea.villa d20c149686 Merge branch 'main' into develop 2024-05-15 13:13:28 +02:00
andrea.villa e6033e1f8d Miglioramento gestione lama su aggregato da sotto 2024-05-15 13:13:08 +02:00
andrea.villa f8974da04c Merge remote-tracking branch 'origin/main' into develop 2024-05-09 12:41:43 +02:00
andrea.villa dcb80bec7c Corretto prelievo lama 2 (H16). Prima di visualizzare utensile, si sposta la Z alla quota massima. 2024-05-09 12:41:32 +02:00
andrea.villa fde0489fe7 Merge branch 'main' into develop 2024-05-06 10:08:11 +02:00
andrea.villa d7f4fb0ef3 In parcheggio paratie/pinze, viene considerato sovramateriale di testa 2024-05-06 10:07:58 +02:00
andrea.villa efa56704d7 Merge branch 'main' into develop 2024-04-30 10:47:14 +02:00
andrea.villa 1f388d6b36 Merge branch 'develop' 2024-04-30 10:46:56 +02:00
andrea.villa c3a31403ce Modifica file log 2024-04-30 10:46:46 +02:00
andrea.villa 40cdb9ec93 Gestione parametro WoodDensity (WOOD_DENSITY in Ts3) 2024-04-30 10:37:32 +02:00
andrea.villa 33cb7da920 per macchina a 3 teste, ripristinato posizionamento testa 2 tramite parametro ParkInLavZ2 2024-04-23 16:40:16 +02:00
andrea.villa 0c8b706f9a Merge branch 'main' into develop 2024-04-23 15:49:03 +02:00
5 changed files with 437 additions and 84 deletions
+181 -34
View File
@@ -166,7 +166,7 @@ function OnDispositionStart()
' P15='..EmtLenToString( -DeltaTabY, 2)..' P16='..EmtLenToString( DeltaTabZ - MillOffs, 2)..
' P17='..EmtLenToString( Delta2TabY, 2)..' P18='..EmtLenToString( -Delta2TabZ - Mill2Offs, 2)
-- se è in configurazione a 3 teste
if EgtGetHeadId( 'H31') then
if EgtGetHeadId( 'H31') then
sOut = sOut .. ' P19='..EmtLenToString( -Delta3TabY, 2)..' P20='..EmtLenToString( Delta3TabZ - Mill3Offs, 2)..
' P21='..EmtLenToString( Mill3Offs, 2).. ' P22='.. EmtLenToString( -ParkInLavZ2, 2)
else
@@ -397,6 +397,8 @@ function OnMachiningStart()
EMT.MCHNAME = EgtGetOperationName( EMT.MCHID)
EMT.MCHTYPE = EgtGetMachiningParam( MCH_MP.TYPE)
EMT.MCHUSERNOTES = EgtGetMachiningParam( MCH_MP.USERNOTES)
EMT.MCHCUT = ( EMT.MCHUSERNOTES:find( 'Cut;', 1, true) ~= nil)
-- se sega a catena, aggiusto subito angolo scelto per asse virtuale A
if EMT.HEAD == 'H13' then
-- valore dell'asse virtuale
@@ -407,16 +409,24 @@ function OnMachiningStart()
-- se lama su aggregato testa sotto, aggiusto subito angolo scelto per asse virtuale A
elseif EMT.HEAD == 'H22' then
-- valore dell'asse virtuale
local dPrevA = dPosA
dPosA = GetCurrSawingVirtualAxis()
-- imposto home dell'asse C2 (A=0 -> T201, A=90 -> T204)
local MyParkCSawC2 = GetSawCHomeFromVirtualAxis( dPosA)
EmtModifyAxisHome( 'C2', MyParkCSawC2)
-- se lavorazione attuale e precedente con lama su aggregato da sotto con angolo A diverso, devo scaricare e ricaricare
if EMT.HEAD == EMT.PREVHEAD_H2 then
if abs( dPosA - dPrevA) > 1 then
EMT.TO_ZMAX = true
EMT.R3_CHANGED = true
end
end
end
-- gestione eventuale lavorazione in doppio
local nDouType = EgtGetValInNotes( EMT.MCHUSERNOTES, 'DOUBLE', 'i')
if nDouType == 2 or nDouType == 3 then
local sDouTool = EgtGetValInNotes( EMT.TUSERNOTES, 'DOUBLE', 's') or ''
local sDouTool = EgtGetValInNotes( EMT.MCHUSERNOTES, 'TOOLDOUBLE', 's') or EgtGetValInNotes( EMT.TUSERNOTES, 'DOUBLE', 's') or ''
local sOldTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
if EgtTdbSetCurrTool( sDouTool) and EgtTdbGetCurrToolParam( MCH_TP.ACTIVE) then
-- salvo dati
@@ -465,18 +475,18 @@ function OnMachiningEnd()
EmitRemark( 'PART UNLOAD')
elseif EMT.AUXTYPE == 'P' then
if EMT.PREROT then
EmitZmax( false, true, EMT.R1, EMT.R2)
EmitZmax( false, true, EMT.R1, EMT.R2, false, false, false)
EMT.ZMAX = true
EmitRemark( 'PART ROTATION')
elseif EMT.FALL then
if EMT.TO_ZMAX and not EMT.ZMAX then
EmitZmax( false, true, EMT.R1, EMT.R2)
EmitZmax( false, true, EMT.R1, EMT.R2, false, false, false)
EMT.ZMAX = true
EMT.TO_ZMAX = nil
end
EmitRemark( 'PART FALL')
else
EmitZmax( false, true, EMT.R1, EMT.R2)
EmitZmax( false, true, EMT.R1, EMT.R2, false, false, false)
EMT.ZMAX = true
EmitRemark( 'PART SPLIT 2')
end
@@ -525,7 +535,10 @@ function OnMachiningEnd()
EMT.PREVTOOL = EMT.TOOL
if EMT.DOU_TYPE and not EMT.ZMAX then EMT.DOU_TO_ZMAX = EMT.DOU_TYPE end
EMT.DOU_TYPE = nil
-- se taglio finale, aggiorno lunghezza barra
if EMT.MCHCUT then
EMT.LB = EMT.LT + ( EMT.X_OFF or 0)
end
-- salvo dati utensile
local nSetHead = GetHeadSet( EMT.HEAD)
-- per gruppo testa 1
@@ -556,10 +569,12 @@ function OnPathStart()
--MyOutput( 'CNT='.. tostring( EMT.CNT or 0))
-- se utensile non cambiato, salvo eventuali precedenti rotanti
if EMT.TOOL == EMT.PREVTOOL and not EMT.ZMAX then
EMT.L2pp = EMT.L2op
EMT.L3pp = EMT.L3op
EMT.R1pp = EMT.R1p
EMT.R2pp = EMT.R2p
else
EMT.L2pp = nil
EMT.L3pp = nil
EMT.R1pp = nil
EMT.R2pp = nil
@@ -575,6 +590,10 @@ function OnPathEnd()
if not EMT.ZMAX then
EmitResetMachining()
end
-- salvo dati precedenti
EMT.L2pp = EMT.L2o
EMT.AUXTYPE = nil
EMT.UNL = nil
EMT.PREROT = nil
@@ -805,12 +824,20 @@ function OnRapid()
-- se bisogna scrivere tutti gli assi
if WriteAllCoordsOnFirstM101 then
if EMT.HEAD == 'H22' then
EmitMoveDataHead( 2, { X=MinX2, Z=ParkZ2, B=ParkB2, C=ParkC2, S=Speed})
EmitMoveDataHead( 2, { X=ParkSawX2, Z=ParkZ2, B=0, C=ParkC2, S=Speed})
EMT.L2pp = ParkSawX2
else
EmitMoveDataHead( 2, { X=ParkX2, Z=ParkZ2, B=ParkB2, C=ParkC2, S=Speed})
EMT.L2pp = ParkX2
end
else
EmitMoveDataHead( 2, { X=ParkX2, S=Speed})
if EMT.HEAD == 'H22' then
EmitMoveDataHead( 2, { X=ParkSawX2, S=Speed})
EMT.L2pp = ParkSawX2
else
EmitMoveDataHead( 2, { X=ParkX2, S=Speed})
EMT.L2pp = ParkX2
end
end
EmitMoveStartHead( 2)
EmitMoveWaitHead( 2)
@@ -821,8 +848,19 @@ function OnRapid()
local dPosT = EMT.TPOS or EMT.L1op
EmitParkRoller( dPosT, bSplitCut)
end
EmitMoveDataHead( 2, { X=EMT.L2, Z=EMT.L3, S=Speed})
EmitMoveDataHead( 2, { B=EMT.R2, C=EMT.R1, S=Speed})
-- vado a quota sicurezza in X per permettere rotazione assi rotanti
if ( not EMT.L2pp or ( EMT.L2pp and EMT.L2pp > ParkMchY2)) and ( ParkB2 ~= EMT.R2 or ParkC2 ~= EMT.R1) then
EmitMoveDataHead( 2, { X=ParkMchY2, Z=ParkZ2, B=ParkB2, C=ParkC2, S=Speed})
end
-- scrivo solo se gli assi rotanti sono cambiati
if EMT.HEAD == 'H22' and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then
EmitMoveDataHead( 2, { B=EMT.R2, C=EMT.R1, S=Speed})
end
if EMT.ZMAX then
EmitMoveDataHead( 2, { X=EMT.L2, B=EMT.R2, C=EMT.R1, S=Speed})
else
EmitMoveDataHead( 2, { X=EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
end
EmitMoveStartHead( 2)
-- eventuale preselezione successiva testa 1
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
@@ -909,7 +947,18 @@ function OnRapid()
else
--MyOutput( string.format( 'V1Pos=%.3f V2Pos=%.3f', EMT.V1POS, EMT.V2POS))
if not EMT.RELOAD and not EMT.ZMAX and #EMT.AUXCMD > 0 and EMT.TO_ZMAX then
EmitZmax( false, false, PrevR1, PrevR2)
-- caso speciale in cui bisogna solo cambiare presa aggregato lama sotto
if EMT.R3_CHANGED then
-- EmitZmax è fatta per essere chiamata con utensile attuale. In questo caso l'attuale è già quello con nuova rotazione
-- Allora salvo l'attuale e imposto il vecchio solo momentanemente, per poi ripristinarlo
local sBckTcPos = EMT.TCPOS
EMT.TCPOS = EMT.PREVTCPOSREAL_H2
EmitZmax( false, false, PrevR1, PrevR2, false, false, true)
EMT.TCPOS = sBckTcPos
EMT.R3_CHANGED = nil
else
EmitZmax( false, false, PrevR1, PrevR2, false, false, true)
end
EMT.ZMAX = true
EMT.TO_ZMAX = nil
PrevR1 = EgtGetAxisHomePos( EgtIf( nHSet == 1, 'C1', 'C2'))
@@ -987,9 +1036,20 @@ function OnRapid()
EmitMoveDataHead( 1, { Z=EMT.L3, B=EMT.R2, S=Speed})
-- caso standard
else
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
-- se ero in posizione speciale, prima ruoto poi scendo
if bXSpec then
local dZPos = max( HomeZ1, EMT.L3)
EmitMoveDataHead( 1, { Z=dZPos, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { X=EMT.L2, S=Speed})
if abs( dZPos - EMT.L3) > 1 then
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
end
else
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
end
end
-- altrimenti sega a catena
else
@@ -1069,7 +1129,7 @@ function OnRapid()
local CurrC2 = PrevR1
local dSafeZ2 = EgtGetAxisHomePos( 'Z2')
local Speed = EMT.S * EgtIf( EMT.HEAD ~= 'H22', 1, 1.65)
if not EMT.L2p then EMT.L2p = EgtGetAxisHomePos( 'X2') end
if not EMT.L2pp then EMT.L2pp = EgtGetAxisHomePos( 'X2') end
-- calcolo posizione reale
EMT.TCPOSREAL = 'T' .. AdjustTcPos( false, EMT.TCPOS, EMT.R3)
-- se utensile cambiato (controllo il reale perchè per aggregato dipende come è stato caricato)
@@ -1078,26 +1138,36 @@ function OnRapid()
-- se bisogna scrivere tutti gli assi
if WriteAllCoordsOnFirstM101 then
if EMT.HEAD == 'H22' then
EmitMoveDataHead( 2, { X=MinX2, Z=-CurrZ2, B=CurrB2, C=CurrC2, S=Speed})
EmitMoveDataHead( 2, { X=ParkSawX2, Z=-dSafeZ2, B=0, C=CurrC2, S=Speed})
EMT.L2pp = ParkSawX2
else
EmitMoveDataHead( 2, { X=SafeX2, Z=-CurrZ2, B=CurrB2, C=CurrC2, S=Speed})
EmitMoveDataHead( 2, { X=SafeX2, Z=-dSafeZ2, B=CurrB2, C=CurrC2, S=Speed})
EMT.L2pp = SafeX2
end
else
if EMT.HEAD == 'H22' then
EmitMoveDataHead( 2, { X=ParkSawX2, S=Speed})
EMT.L2pp = ParkSawX2
else
EmitMoveDataHead( 2, { X=SafeX2, S=Speed})
EMT.L2pp = SafeX2
end
end
-- scrivo solo se gli assi rotanti sono cambiati
EmitMoveDataHead( 2, { Z=-dSafeZ2, S=Speed})
if EMT.L2p > ParkMchY2 and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then
if EMT.L2pp > ParkMchY2 and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then
EmitMoveDataHead( 2, { X=ParkMchY2, Z=-dSafeZ2, B=CurrB2, C=CurrC2, S=Speed})
end
else
-- scrivo solo se gli assi rotanti sono cambiati
if EMT.L2p > ParkMchY2 and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then
if EMT.L2pp > ParkMchY2 and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then
EmitMoveDataHead( 2, { X=ParkMchY2, Z=-dSafeZ2, B=CurrB2, C=CurrC2, S=Speed})
end
end
-- se stesso utensile vado già alla X di lavoro
else
-- scrivo solo se gli assi rotanti sono cambiati
if EMT.L2p > ParkMchY2 and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then
if EMT.ZMAX and EMT.L2pp > ParkMchY2 and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then
EmitMoveDataHead( 2, { X=ParkMchY2, Z=-dSafeZ2, B=CurrB2, C=CurrC2, S=Speed})
end
end
@@ -1105,7 +1175,11 @@ function OnRapid()
if EMT.HEAD == 'H22' and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then
EmitMoveDataHead( 2, { B=EMT.R2, C=EMT.R1, S=Speed})
end
EmitMoveDataHead( 2, { X=EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
if EMT.ZMAX then
EmitMoveDataHead( 2, { X=EMT.L2, B=EMT.R2, C=EMT.R1, S=Speed})
else
EmitMoveDataHead( 2, { X=EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
end
EmitMoveStartHead( 2)
-- eventuale preselezione successiva testa 1
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
@@ -1195,6 +1269,10 @@ function OnRapid()
EmitMoveStartHead( 1)
local dX2 = Delta2TabY + EMT.DOU_TLEN - ( -DeltaTabY - EMT.L2 + EMT.TLEN + EgtIf( BD.RIGHT_LOAD, -EMT.HB, EMT.HB))
local dZ2 = -Head2Z + MillOffs + Mill2Offs + EMT.L3
-- dato che la testa 2 è slave, bisogna controllare eventuale extra-corsa da post
if dZ2 > MaxZ2 then
EmtSetLastError( 1220, EMT.MCHNAME..' ==> Out of Stroke: Z2 : '.. EgtNumToString( dZ2-MaxZ2, 2))
end
local dC2 = EMT.R1
local dB2 = EMT.R2
EmitMoveDataHead( 2, { Z=-dZ2, B=dB2, C=dC2, TPos=EMT.DOU_TPOS, S=EMT.DOU_SPEED})
@@ -1242,6 +1320,14 @@ function OnRapid()
EMT.R1p = nil
EMT.R2p = nil
else
-- se lavorazione in doppio controllo le corse
if EMT.DOU_TYPE == 2 then
local dZ2 = -Head2Z + MillOffs + Mill2Offs + EMT.L3
-- dato che la testa 2 è slave, bisogna controllare eventuale extra-corsa da post
if dZ2 > MaxZ2 then
EmtSetLastError( 1220, EMT.MCHNAME..' ==> Out of Stroke: Z2 : '.. EgtNumToString( dZ2-MaxZ2, 2))
end
end
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
end
@@ -1267,7 +1353,7 @@ function OnRapid()
-- porto in home la testa corrente se lavorazione successiva sopra con testa diversa oppure se punta lunga
local nNextTopHSet = GetNextTopHSet( EMT.MCHID)
local bTopGoHome = ( nHSet ~= 2 and nNextTopHSet ~= 0 and nHSet ~= nNextTopHSet) or ( nHSet == 1 and EMT.TTOTLEN > LongTool)
EmitZmax( true, true, EMT.R1p, EMT.R2p, bSplitCut, bTopGoHome)
EmitZmax( true, true, EMT.R1p, EMT.R2p, bSplitCut, bTopGoHome, false)
-- aggiorno quota finale trave dopo Zmax
EMT.L1o = EMT.TPOS
EMT.ZMAX = true
@@ -1375,6 +1461,54 @@ end
---------------------------------------------------------------------
function OnArc()
-- se necessario, impostazione riferimento locale
if EMT.REFLOC == 0 then
-- calcolo per piano generico
CalcInterpPlane()
EMT.REFLOC = 1
-- salvo posizione attuale
local OldL1 = EMT.L1
local OldL2 = EMT.L2
local OldL3 = EMT.L3
-- imposto posizione precedente (se presente devo annullare l'offset in X per sovramateriale di testa)
EMT.L1 = EMT.L1o
EMT.L2 = EMT.L2o
EMT.L3 = EMT.L3o
if EMT.X_OFF then EMT.L1 = EMT.L1 - EMT.X_OFF end
-- trasformo i punti nel piano
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
EMT.L1p = nil
EMT.L2p = nil
EMT.L3p = nil
MyOutput( 'M105 P1=' .. GetFaceCode() .. ' P2='..GetHeadSetCode()..' P3='..EgtIf( EMT.DOU_TYPE, 2, 0))
MyOutput( 'M98')
MyOutput( 'M6 ' .. GetHeadToolCode() .. AdjustTcPos( true))
MyOutput( 'G24' .. EMT.IPLGLSTR)
-- emissione movimento
EMT.R1p = nil
EMT.R2p = nil
if EmitRapidInG1 then
local sFeed = ' F30000'
sOut = 'G1'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..
EmtGetAxis('R2')..EmtGetAxis('R1')..sFeed
else
sOut = 'G0'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..
EmtGetAxis('R2')..EmtGetAxis('R1')
end
MyOutput( sOut)
-- aggiorno precedenti
local nOriginalMove = EMT.MOVE
EMT.MOVE = 0
EmtUpdatePrev()
EMT.MOVE = nOriginalMove
-- ripristino posizione attuale
EMT.L1 = OldL1
EMT.L2 = OldL2
EMT.L3 = OldL3
end
-- se primo movimento in feed della lavorazione, dichiaro inizio lavorazione
if EMT.MCHFIRSTFEED then
EMT.MCHFIRSTFEED = nil
@@ -1417,7 +1551,7 @@ end
function CalcDinamicaPinze( dH, dS, dL)
local MinTempoAcc = 0.6 -- [s]
local MaxTempoAcc = 6.0 -- [s]
local KgMtCubo= 550 -- densità legno [Kg / metro cubo]
local KgMtCubo= WoodDensity or 550 -- densità legno [Kg / metro cubo]
local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg]
local FMaxPinze = EMT.FMAXPINZE -- Feed massima pinze [mm/min]
local ForzaAttrito = 350 * 9.8 * 0.2 -- Forza chiusura pinze [Kgf] * g * Coeff_Attrito -> [N]
@@ -1442,7 +1576,7 @@ function CalcForzaPinze( dH, dS, dL, dT)
if dMinJoin < 0.9 * BD.MIN_JOIN_L then
return MinForzaPinze
else
local KgMtCubo= 550 -- densità legno [Kg / metro cubo]
local KgMtCubo= WoodDensity or 550 -- densità legno [Kg / metro cubo]
local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg]
local Forza = Massa / MassaRef * MaxForzaPinze
return EgtClamp( Forza, MinForzaPinze, MaxForzaPinze)
@@ -2131,12 +2265,13 @@ function AdjustTcPos( bLen3, sTcPos, dAxR3)
if not dAxR3 then dAxR3 = EMT.R3 end
if abs( dAxR3 - 0) < 0.1 then
sPos = '201'
elseif abs( dAxR3 - 270) < 0.1 then
sPos = '202'
elseif abs( dAxR3 - 180) < 0.1 then
sPos = '203'
elseif abs( dAxR3 - 90) < 0.1 then
sPos = '204'
-- Lama su aggregato da sotto non può essere presa in queste posizioni per problemi di collisione durante parcheggio
--elseif abs( dAxR3 - 270) < 0.1 then
-- sPos = '202'
--elseif abs( dAxR3 - 180) < 0.1 then
-- sPos = '203'
else
EmtSetLastError( 1210, 'Saw orientation not allowed')
end
@@ -2230,11 +2365,12 @@ function GetHeadToolCode()
end
---------------------------------------------------------------------
function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome)
function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome, bUsePrevDelta)
if bReset then
EmitResetMachining()
end
local nSetHead = GetHeadSet( EMT.HEAD)
local dXPos = EgtIf( bUsePrevDelta, EMT.L2pp or EMT.L2o, EMT.L2o)
-- se testa 1
if nSetHead == 1 then
-- posizioni sicure
@@ -2255,12 +2391,12 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome)
local dZref = dHomeZ1 + GetZExtra( EMT.HEAD, PrevR2)
dZref = min( dZref, dMaxZ1)
local MovH = { Z = EgtIf( dZref > EMT.L3o, dZref, EMT.L3o)}
MovH.X = -EMT.L2o ; MovH.B = EgtClamp( PrevR2, -90, 90) ; MovH.C = PrevR1 ;
MovH.X = -dXPos ; MovH.B = EgtClamp( PrevR2, -90, 90) ; MovH.C = PrevR1 ;
EmitMoveDataHead( 1, MovH)
if ( EMT.HEAD == 'H12' or EMT.HEAD == 'H16') and ( abs( dHomeC1 - PrevR1) > 30.1 or abs( dHomeB1 - PrevR2) > 30.1) then
EmitMoveDataHead( 1, { Z=dMaxZ1, B=0, Fmt=1})
end
if EgtIf( BD.RIGHT_LOAD, ( EMT.L2 > -DeltaTabY), ( EMT.L2 < -DeltaTabY)) then
if EgtIf( BD.RIGHT_LOAD, ( -dXPos > -DeltaTabY), ( -dXPos < -DeltaTabY)) then
EmitMoveDataHead( 1, { X=-DeltaTabY, Fmt=1})
end
EmitMoveDataHead( 1, { C=dHomeC1, Fmt=1})
@@ -2306,6 +2442,10 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome)
else
EmitMoveDataHead( 2, { X=dHomeX2, Fmt=1})
end
-- solo se è macchina a 3 teste con gruppo truciolatore 4 assi, devo stare più alto
if EgtGetHeadId( 'H39') then
EmitMoveDataHead( 2, { Z=-ParkInLavZ2, Fmt=1})
end
EmitMoveStartHead( 2)
EmitMoveWaitHead( 2)
-- altrimenti testa 3
@@ -2322,6 +2462,11 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome)
EmitMoveStartHead( 3)
EmitMoveWaitHead( 3)
end
-- resetto posizione precedente assi
EMT.L2pp = nil
EMT.L3pp = nil
EMT.R1pp = nil
EMT.R2pp = nil
end
---------------------------------------------------------------------
@@ -2408,7 +2553,7 @@ function EmitParkRoller( dPosT, bSplitCut)
local dPosY1 = dPosT + EMT.Y1DELTA
local DiffY1 = MyParkY1 - dPosY1
local dMoveY1 = EgtIf( DiffY1 > 0.1, dMoveV1, 0)
local dTryMoveY1 = ParkV1 - dPosT - EgtIf( bSplitCut or EMT.FALL, EMT.LT, 0)
local dTryMoveY1 = min( ParkV1 - dPosT - EgtIf( bSplitCut or EMT.FALL, EMT.LT, 0), MaxY1 - dPosY1 - 10)
if ( dPosT > ParkV2 - ExtraParkV and dPosT < ParkV1 and dPosY1 + dTryMoveY1 < MaxY1) then dMoveY1 = max( dMoveY1, dTryMoveY1) end
--MyOutput( string.format( 'PosT=%.3f PosY1=%.3f V1POS=%.3f Split=%s', dPosT, dPosY1, EMT.V1POS, EgtIf( bSplitCut, '1', '0')))
MDChar.Y1 = dPosY1 + dMoveY1
@@ -2420,8 +2565,8 @@ function EmitParkRoller( dPosT, bSplitCut)
local dPosY2 = dPosT + EMT.Y2DELTA
local DiffY2 = MyParkY2 - dPosY2
local dMoveY2 = EgtIf( DiffY2 < -0.1, dMoveV2, 0)
local dTryMoveY2 = ParkV2 - dPosT - EMT.LT
if ( dPosT + EMT.LT < ParkV1 + ExtraParkV and dPosT + EMT.LT > ParkV2 and dPosY2 + dTryMoveY2 > MinY2) then dMoveY2 = min( dMoveY2, dTryMoveY2) end
local dTryMoveY2 = max( ParkV2 - dPosT - EMT.LT - EMT.HOVM, MinY2 - dPosY2 + 10)
if ( dPosT + EMT.LT + EMT.HOVM < ParkV1 + ExtraParkV and dPosT + EMT.LT + EMT.HOVM > ParkV2 and dPosY2 + dTryMoveY2 > MinY2) then dMoveY2 = min( dMoveY2, dTryMoveY2) end
--MyOutput( string.format( 'PosT=%.3f LT=%.3f PosY2=%.3f V2POS=%.3f', dPosT, EMT.LT, dPosY2, EMT.V2POS))
MDChar.Y2 = dPosY2 + dMoveY2
MDChar.MovType = 2
@@ -2496,6 +2641,8 @@ function PreselectNextDiffHead( nMchId, sHead)
if sNextHead == 'H22' or EMT.PREVHEAD_H2 == 'H22' then return end
-- se la Z di lavoro è più bassa del cambio della minima Z
if EMT.MAXMIN[3] < MinZ1ToChangeH2 then
-- se diametro utensile più del truciolatore standard grande, si rischia di collidere anche con il carro X testa sotto (quindi indipendentemente dalla Y della lavorazione)
if EMT.TTOTDIAM > 201 then return end
-- verifico quota del TC
if BD.RIGHT_LOAD and EMT.MAXMAX[2] > ( DeltaTabY + MaxHoOpen + 200) then return end
if not BD.RIGHT_LOAD and EMT.MAXMAX[2] > ( DeltaTabY + 200) then return end
+146 -42
View File
@@ -16,7 +16,7 @@ local sBaseDir = EgtGetCurrMachineDir()
if NumericalControl == 'NUM' then
error( 'Numerical Control error : NUM not yet managed')
elseif NumericalControl == 'TPA' then
dofile( sBaseDir .. '\\Common-PF1250.TPA.mlpe')
dofile( sBaseDir .. '\\Common_PF1250.TPA.mlpe')
else
error( 'Numerical Control error : unkwnown type')
end
@@ -106,7 +106,7 @@ function OnSimulStart()
AddToCollisionCheck( 'X2', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'C2', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'B2', 'COLLISION', EMT.COLLOBJ)
if EgtGetHeadId('H31') then
if IsHeadExisting( 3) then
AddToCollisionCheck( 'Z3', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'C3', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'B3', 'COLLISION', EMT.COLLOBJ)
@@ -121,12 +121,15 @@ function OnSimulStart()
{ Grp = 'Base', Sub = 'COLLISION', Name = 'COL2'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'CHSAW'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'CEIL'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'TC1'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'TC2'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'TCR'},
{ Grp = 'Z2', Sub = 'COLLISION', Name = 'COL1'},
{ Grp = 'Z2', Sub = 'COLLISION', Name = 'CHAIN'},
{ Grp = 'Z2', Sub = 'COLLISION', Name = 'COL2'},
{ Grp = 'X1', Sub = 'COLLISION', Name = 'STM'}}
if EgtGetHeadId('H31') then
if IsHeadExisting( 3) then
table.insert( McdData, { Grp = 'X3', Sub = 'COLLISION', Name = 'STM'})
end
@@ -449,14 +452,14 @@ function OnSimulToolSelect( dPosA)
EMT.TTOTLEN = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
EMT.TUSERNOTES = EgtTdbGetCurrToolParam( MCH_TP.USERNOTES)
-- recupero il gruppo
local nSetHead = GetHeadSet( EMT.NEXTHEAD)
local nSetHead = GetHeadSet( EMT.HEAD)
-- se fresa o lama su testa 1, reset assi rotanti
if nSetHead == 1 then
-- se ho la testa 3, la mando a parcheggio
if EgtGetHeadId( 'H31') then
if IsHeadExisting( 3) then
EgtSetAxisPos( 'X3', ParkX3)
end
if EMT.HEAD == 'H12' then
if EMT.HEAD == 'H12' or EMT.HEAD == 'H16' then
EgtSetAxisPos( 'Z1', MaxZ1Blade)
end
EgtResetAxisPos( 'C1')
@@ -480,12 +483,14 @@ function OnSimulToolSelect( dPosA)
end
-- se lama su aggregato da sotto, imposto subito angolo scelto per asse virtuale A
if EMT.HEAD == 'H22' then
-- se c'era un altro utensile, imposto subito asse virtuale
if EMT.PREVHEAD_H2 ~= 'H22' then
dPosA = dPosA or GetNextSawingVirtualAxis( EMT.MCHID)
end
if dPosA then
-- valore dell'asse virtuale
dPosA = dPosA or GetNextSawingVirtualAxis( EMT.MCHID)
-- imposto il valore di A
EgtSetAxisPos( 'A2', dPosA)
-- imposto home dell'asse C1 (A2=0 -> T101, A2=90 -> T104)
-- imposto home dell'asse C1 (A2=0 -> T201, A2=90 -> T204)
local MyParkSawC2 = GetSawCHomeFromVirtualAxis( dPosA)
EmtModifyAxisHome( 'C2', MyParkSawC2)
EgtSetAxisPos( 'C2', MyParkSawC2)
@@ -531,7 +536,7 @@ function OnSimulToolDeselect( dPrevA)
if nSetHead == 3 then
SimulMoveAxis( 'X3', ParkX3, MCH_SIM_STEP.RAPID)
-- per testa gruppo 2
elseif nNextSetHead == 2 and EMT.PREVTCPOS_H2 then
elseif nNextSetHead == 2 then
-- deposito lama su aggregato testa sotto
if EMT.PREVHEAD_H2 == 'H22' then
-- simulo movimento
@@ -557,12 +562,12 @@ function OnSimulToolDeselect( dPrevA)
local nPrevTc = GetTcForTopHeadTool( EMT.PREVTCPOS_H1)
if EMT.PREVTTOTLEN_H1 < LongTool then
SimulMoveAxes( 'B1', ParkB1, MCH_SIM_STEP.RAPROT, 'C1', ParkC1, MCH_SIM_STEP.RAPROT)
local dPosX = EgtIf( nPrevTc ~= 2, ParkX1, ParkTc2X1)
local dPosX = EgtIf( nPrevTc ~= 2, ParkTc1X1, ParkTc2X1)
SimulMoveAxis( 'X1', dPosX, MCH_SIM_STEP.RAPID)
else
if nPrevTc ~= 2 then
SimulMoveAxes( 'B1', ParkLongB1, MCH_SIM_STEP.RAPROT, 'C1', ParkLongTc1C1, MCH_SIM_STEP.RAPROT)
local dPosX = ParkX1
local dPosX = ParkTc1X1
SimulMoveAxis( 'X1', dPosX, MCH_SIM_STEP.RAPID)
else
SimulMoveAxes( 'B1', ParkLongB1, MCH_SIM_STEP.RAPROT, 'C1', ParkLongTc2C1, MCH_SIM_STEP.RAPROT)
@@ -574,7 +579,7 @@ function OnSimulToolDeselect( dPrevA)
elseif EMT.PREVHEAD_H1 == 'H12' then
-- simulo movimento
SimulMoveAxes( 'B1', ParkB1, MCH_SIM_STEP.RAPROT, 'C1', ParkC1, MCH_SIM_STEP.RAPROT)
SimulMoveAxis( 'X1', ParkX1, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'X1', ParkTc1X1, MCH_SIM_STEP.RAPID)
-- deposito utensile sega a catena
elseif EMT.PREVHEAD_H1 == 'H13' then
-- simulo movimento
@@ -613,14 +618,14 @@ function OnSimulToolDeselect( dPrevA)
if EMT.NEXTHEAD == 'H11' then
-- simulo movimento
SimulMoveAxes( 'B1', ParkB1, MCH_SIM_STEP.RAPROT, 'C1', ParkC1, MCH_SIM_STEP.RAPROT)
local dPosX = EgtIf( GetTcForTopHeadTool( EMT.NEXTTCPOS) ~= 2, ParkX1, ParkTc2X1)
local dPosX = EgtIf( GetTcForTopHeadTool( EMT.NEXTTCPOS) ~= 2, ParkTc1X1, ParkTc2X1)
SimulMoveAxis( 'X1', dPosX, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'Z1', MaxZ1, MCH_SIM_STEP.RAPID)
-- prendo utensile lama
elseif EMT.NEXTHEAD == 'H12' then
-- simulo movimento
SimulMoveAxes( 'B1', ParkB1, MCH_SIM_STEP.RAPROT, 'C1', ParkC1, MCH_SIM_STEP.RAPROT)
SimulMoveAxis( 'X1', ParkX1, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'X1', ParkTc1X1, MCH_SIM_STEP.RAPID)
-- prendo utensile sega a catena
elseif EMT.NEXTHEAD == 'H13' then
-- simulo movimento
@@ -660,16 +665,23 @@ function OnSimulMachiningStart()
OnSimulToolSelect( dPosA)
end
end
-- se lavorazione attuale e precedente con sega a catena con angolo A diverso, devo scaricare e ricaricare
-- se lavorazione attuale e precedente con aggregato lama da sotto con angolo A diverso, devo scaricare e ricaricare
if EMT.HEAD == 'H22' and EMT.HEAD == EMT.PREVHEAD_H2 then
local dPrevA = EgtGetAxisPos( 'A2')
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
local dPosA = tonumber( sVal:sub( 4)) or 0
if abs( dPosA - dPrevA) > 1 then
ExecParkRoller( nil, nil, nil, nil, false, bAgg)
-- setto i valori per la funzione ToolDesel
EMT.NEXTHEAD = EMT.HEAD
EMT.NEXTTOOL = EMT.TOOL
EMT.NEXTEXIT = EMT.EXIT
OnSimulToolDeselect( dPrevA)
EgtSetStatus( EgtGetHeadId( EMT.HEAD), GDB_ST.ON)
OnSimulToolSelect( dPosA)
-- aggiorno dati utensile su testa
EMT.TCPOSREAL = 'T' .. AdjustTcPos( false, EMT.TCPOS, dPosA)
EMT.PREVTCPOSREAL_H2 = EMT.TCPOSREAL
end
end
-- recupero alcuni dati della lavorazione
@@ -717,6 +729,35 @@ function OnSimulMachiningStart()
EmtSetLastError( 1211, 'Missing or not active double tool of '..sOldTool)
end
EgtTdbSetCurrTool( sOldTool)
else
-- recupero il gruppo
local nSetHead = GetHeadSet( EMT.HEAD)
if nSetHead ~= 1 and ( EMT.PREVTOOL_H1 and EMT.PREVHEAD_H1) then
local nPrevExit_H1 = 1
local nInd_H1 = 1001
AddToolToCollisionObj( EMT.PREVTOOL_H1, EMT.PREVHEAD_H1, nPrevExit_H1, nInd_H1, true)
AddToolHolderToCollisionObj( EMT.PREVTOOL_H1, EMT.PREVHEAD_H1, nPrevExit_H1, nInd_H1 + 1)
end
if nSetHead ~= 2 and ( EMT.PREVTOOL_H2 and EMT.PREVHEAD_H2) then
local nPrevExit_H2 = 1
local nInd_H2 = 1011
AddToolToCollisionObj( EMT.PREVTOOL_H2, EMT.PREVHEAD_H2, nPrevExit_H2, nInd_H2, true)
AddToolHolderToCollisionObj( EMT.PREVTOOL_H2, EMT.PREVHEAD_H2, nPrevExit_H2, nInd_H2 + 1)
end
if nSetHead ~= 3 and IsHeadExisting( 3) then
local nPrevExit_H3 = 1
local nInd_H3 = 1001
local sHeadName
if EgtGetHeadId( 'H39') then
sHeadName = 'H39'
elseif EgtGetHeadId( 'H38') then
sHeadName = 'H38'
else
sHeadName = 'H31'
end
AddToolToCollisionObj( nil, sHeadName, nPrevExit_H3, 1001)
AddToolHolderToCollisionObj( nil, sHeadName, nPrevExit_H3, 1002)
end
end
-- se precedente in doppio ma ora solo testa 1 e non in sicurezza
if EMT.DOU_TO_ZMAX then
@@ -759,18 +800,20 @@ function OnSimulMachiningEnd()
EMT.PREVHEAD_H1 = EMT.HEAD
EMT.PREVTCPOS_H1 = EMT.TCPOS
EMT.PREVTTOTLEN_H1 = EMT.TTOTLEN
EMT.PREVTCPOSREAL_H1 = EMT.TCPOSREAL
-- per gruppo testa 2
elseif nSetHead == 2 then
EMT.PREVTOOL_H2 = EMT.TOOL
EMT.PREVHEAD_H2 = EMT.HEAD
EMT.PREVTCPOS_H2 = EMT.TCPOS
EMT.PREVTTOTLEN_H2 = EMT.TTOTLEN
-- per gruppo testa 3 (resetto dati testa 1)
EMT.PREVTCPOSREAL_H2 = EMT.TCPOSREAL
-- per gruppo testa 3
else
EMT.PREVTOOL_H3 = nil
EMT.PREVHEAD_H3 = nil
EMT.PREVTCPOS_H3 = nil
EMT.PREVTTOTLEN_H3 = nil
EMT.PREVTOOL_H3 = EMT.TOOL
EMT.PREVHEAD_H3 = EMT.HEAD
EMT.PREVTCPOS_H3 = EMT.TCPOS
EMT.PREVTTOTLEN_H3 = EMT.TTOTLEN
end
end
@@ -926,10 +969,21 @@ function OnSimulMoveStart()
if WriteAllCoordsOnFirstM101 then
SimulMoveAxis( 'X1', EgtIf( bXSpec, DeltaTabY, EMT.L2), MCH_SIM_STEP.RAPID)
end
SimulMoveAxis( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C1', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'X1', EMT.L2, MCH_SIM_STEP.RAPID)
-- se ero in posizione speciale, prima ruoto poi scendo
if bXSpec then
local dZPos = max( Z1Home, EMT.L3)
SimulMoveAxis( 'Z1', dZPos, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B1', EMT.R2, MCH_SIM_STEP.COLLROT, 'C1', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'X1', EMT.L2, MCH_SIM_STEP.RAPID)
if abs( dZPos - EMT.L3) > 1 then
SimulMoveAxis( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID)
end
else
SimulMoveAxis( 'Z1', EMT.L3, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B1', EMT.R2, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C1', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'X1', EMT.L2, MCH_SIM_STEP.RAPID)
end
end
end
-- altrimenti sega a catena
@@ -957,14 +1011,27 @@ function OnSimulMoveStart()
local X2Pos = EgtGetAxisPos( 'X2')
local B2Pos = EgtGetAxisPos( 'B2')
local C2Pos = EgtGetAxisPos( 'C2')
if EMT.TOOL ~= EMT.PREVTOOL_H2 then
-- calcolo posizione reale
EMT.TCPOSREAL = 'T' .. AdjustTcPos( false, EMT.TCPOS, EMT.R3)
-- se utensile cambiato (controllo il reale perchè per aggregato dipende come è stato caricato)
if EMT.PREVTCPOSREAL_H2 ~= EMT.TCPOSREAL then
if EMT.ZMAX then
-- se bisogna scrivere tutti gli assi
if WriteAllCoordsOnFirstM101 then
if EMT.HEAD == 'H22' and EMT.PREVHEAD_H2 ~= EMT.HEAD then
SimulMoveAxes( 'X2', MinX2, MCH_SIM_STEP.RAPID, 'B2', B2Home, MCH_SIM_STEP.COLLROT, 'C2', C2Home, MCH_SIM_STEP.COLLROT)
if EMT.HEAD == 'H22' then
SimulMoveAxes( 'X2', ParkSawX2, MCH_SIM_STEP.RAPID, 'B2', 0, MCH_SIM_STEP.COLLROT, 'C2', C2Home, MCH_SIM_STEP.COLLROT)
X2Pos = ParkSawX2
else
SimulMoveAxes( 'X2', SafeX2, MCH_SIM_STEP.RAPID, 'B2', B2Home, MCH_SIM_STEP.COLLROT, 'C2', C2Home, MCH_SIM_STEP.COLLROT)
X2Pos = SafeX2
end
else
if EMT.HEAD == 'H22' then
SimulMoveAxis( 'X2', ParkSawX2, MCH_SIM_STEP.RAPID)
X2Pos = ParkSawX2
else
SimulMoveAxis( 'X2', SafeX2, MCH_SIM_STEP.RAPID)
X2Pos = SafeX2
end
end
SimulMoveAxis( 'Z2', Z2Home, MCH_SIM_STEP.RAPID)
@@ -972,21 +1039,24 @@ function OnSimulMoveStart()
if X2Pos > ParkMchY2 and ( B2Pos ~= EMT.R2 or C2Pos ~= EMT.R1) then
SimulMoveAxis( 'X2', ParkMchY2, MCH_SIM_STEP.RAPID)
end
else
-- Porto la X alla giusta quota
if X2Pos > ParkMchY2 and ( B2Pos ~= EMT.R2 or C2Pos ~= EMT.R1) then
SimulMoveAxis( 'X2', ParkMchY2, MCH_SIM_STEP.RAPID)
end
end
else
-- solo se è macchina a 3 teste con gruppo truciolatore 4 assi, devo andare prima in Z0
if EgtGetHeadId( 'H39') then
SimulMoveAxis( 'Z2', Z2Home, MCH_SIM_STEP.RAPID)
end
-- Porto la X alla giusta quota
if X2Pos > ParkMchY2 and ( B2Pos ~= EMT.R2 or C2Pos ~= EMT.R1) then
if EMT.ZMAX and X2Pos > ParkMchY2 and ( B2Pos ~= EMT.R2 or C2Pos ~= EMT.R1) then
SimulMoveAxis( 'X2', ParkMchY2, MCH_SIM_STEP.RAPID)
end
end
if EMT.HEAD == 'H22' then
SimulMoveAxes( 'B2', EMT.R2, MCH_SIM_STEP.COLLROT, 'C2', EMT.R1, MCH_SIM_STEP.COLLROT)
end
-- se ero a ZMAX, mi sposto in posizione a Z home. Ultimo movimento muove in Z
if EMT.ZMAX then
SimulMoveAxes( 'X2', EMT.L2, MCH_SIM_STEP.RAPID, 'B2', EMT.R2, MCH_SIM_STEP.COLLROT, 'C2', EMT.R1, MCH_SIM_STEP.COLLROT)
end
-- altrimenti testa 3
else
; -- non devo fare alcunchè di speciale
@@ -1259,7 +1329,7 @@ function ExecAuxCmd( sCmd, bPathStart)
ExecMoveHome( Cmd[2] == '1', EgtIf( bPathStart, false, EMT.MCHSPLIT))
elseif Cmd[1] == '11' then
local bClose = Cmd[2] ~= '0'
if bPathStart and EMT.MCHSPLIT and not EMT.FALL and GetPY2Light() then bClose = false end
if bPathStart and EMT.MCHSPLIT and not ( EMT.FALL or EMT.TO_FALL) and GetPY2Light() then bClose = false end
ExecMovePY1( bClose)
elseif Cmd[1] == '12' then
ExecMovePY2( Cmd[2] ~= '0')
@@ -1328,6 +1398,17 @@ end
function ExecMoveHome( bNearV, bMchSplit)
-- risalita a Zmax
ExecMoveZmax( bMchSplit)
-- se testa sotto e macchian a 3 teste e gruppo truciolatore a 4 assi
if GetHeadSet( EMT.HEAD) == 2 and IsHeadExisting( 3) then
if not SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID) then
EgtOutLog( 'Error on MoveHome : X2')
end
if EgtGetHeadId( 'H39') then
if not SimulMoveAxis( 'Z2', ParkInLavZ2, MCH_SIM_STEP.RAPID) then
EgtOutLog( 'Error on MoveHome : Z2')
end
end
end
EMT.TO_ZMAX = nil
-- se richiesto, avvicino i rulli
if bNearV then
@@ -1410,6 +1491,10 @@ function ExecMoveZmax( bMchSplit)
else
SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID)
end
-- solo se è macchina a 3 teste con gruppo truciolatore 4 assi, devo stare più alto
if EgtGetHeadId( 'H39') then
SimulMoveAxis( 'Z2', ParkInLavZ2, MCH_SIM_STEP.RAPID)
end
-- altrimenti testa 3
else
SimulMoveAxes( 'Z3', MaxZ3, MCH_SIM_STEP.RAPID)
@@ -1567,7 +1652,7 @@ function ExecParkRoller( PosY1, PosY2, PosV1, PosV2, bSpliCut, bAgg)
local MoveV1 = ParkV1 - PosV1
local DiffY1 = MyParkY1 - PosY1
local MoveY1 = EgtIf( DiffY1 > 0.1, MoveV1, 0)
local TryMoveY1 = ParkV1 - PosT - EgtIf( bSpliCut or EMT.FALL, EMT.LT, 0)
local TryMoveY1 = min( ParkV1 - PosT - EgtIf( bSpliCut or EMT.FALL, EMT.LT, 0), MaxY1 - PosY1 - 10)
if ( PosT > ParkV2 - ExtraParkV and PosT < ParkV1 and PosY1 + TryMoveY1 < MaxY1) then MoveY1 = max( MoveY1, TryMoveY1) end
-- se appena eseguito taglio di separazione
if bSpliCut then
@@ -1597,7 +1682,7 @@ function ExecParkRoller( PosY1, PosY2, PosV1, PosV2, bSpliCut, bAgg)
local MoveV2 = ParkV2 - PosV2
local DiffY2 = MyParkY2 - PosY2
local MoveY2 = EgtIf( DiffY2 < -0.1, MoveV2, 0)
local TryMoveY2 = ParkV2 - PosT - EMT.LT
local TryMoveY2 = max( ParkV2 - PosT - EMT.LT, MinY2 - PosY2 + 10)
if ( PosT + EMT.LT < ParkV1 + ExtraParkV and PosT + EMT.LT > ParkV2 and PosY2 + TryMoveY2 > MinY2) then MoveY2 = min( MoveY2, TryMoveY2) end
if not SimulMoveAxes( 'T', PosT + MoveY2, MCH_SIM_STEP.RAPID,
'V1', ParkV1, MCH_SIM_STEP.RAPID,
@@ -1857,7 +1942,7 @@ function LoadFirstTool( nHSet, sTcPosDef)
if nHSet ~= 1 and nHSet ~= 2 then return end
EgtUnloadTool( EgtIf( nHSet == 1, 'H11', 'H21'), 1)
if GetHeadSetFromTcPos( sTcPosDef) ~= nHSet then return end
local sTool, sHead, sTcPos, sTTotLen, sBlockedAxis = FindFirstToolOnHeadSet( nHSet)
local sTool, sHead, sTcPos, sTTotLen, sTotDiam, sBlockedAxis = FindFirstToolOnHeadSet( nHSet)
if not sTool then
local vTools = EgtGetToolsInCurrSetupPos( sTcPosDef)
if vTools and vTools[1] then
@@ -1869,7 +1954,7 @@ function LoadFirstTool( nHSet, sTcPosDef)
if sTool then
-- imposto correttamente i dati di testa
local OrigEMC = EMC
EMC = { HEAD = sHead, TOOL = sTool, TCPOS = sTcPos, TOTLEN = sTTotLen, BLOCKEDAXIS = sBlockedAxis}
EMC = { HEAD = sHead, TOOL = sTool, TCPOS = sTcPos, TOTLEN = sTTotLen, TOTDIAM = sTotDiam, BLOCKEDAXIS = sBlockedAxis}
OnSetHead()
EMC = OrigEMC
if sBlockedAxis then
@@ -1882,6 +1967,19 @@ function LoadFirstTool( nHSet, sTcPosDef)
-- carico l'utensile
EgtLoadTool( sHead, 1, sTool)
ShowToolInTcPos( sTcPos, false)
-- salvo utensili caricati
if nHSet == 1 then
EMT.PREVTOOL_H1 = sTool
EMT.PREVHEAD_H1 = sHead
EMT.PREVTCPOS_H1 = sTcPos
EMT.PREVTTOTLEN_H1 = sTTotLen
-- per gruppo testa 2
elseif nHSet == 2 then
EMT.PREVTOOL_H2 = sTool
EMT.PREVHEAD_H2 = sHead
EMT.PREVTCPOS_H2 = sTcPos
EMT.PREVTTOTLEN_H2 = sTTotLen
end
end
return sTool
end
@@ -2295,7 +2393,7 @@ function FindFirstToolOnHeadSet( nHSet)
local CurrMachId = EgtGetCurrMachining()
local CurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
-- cerco lavorazione con utensile su gruppo testa indicato
local sTool, sHead, sTcPos, sTTotLen, sBlockedAxis
local sTool, sHead, sTcPos, sTTotLen, sTotDiam, sBlockedAxis
local OpId = EgtGetFirstActiveOperation()
while OpId do
local nType = EgtGetOperationType( OpId)
@@ -2305,9 +2403,15 @@ function FindFirstToolOnHeadSet( nHSet)
if EgtTdbSetCurrTool( sTest) then
sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
if GetHeadSet( sHead) == nHSet then
sTool = sTest
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
-- aggregato lama non si può mai preselezionare e viene sempre scaricato, quindi non sarà mai già caricato
if nHSet == 2 and sTcPos == 'T201' then
sTcPos = nil
break
end
sTool = sTest
sTTotLen = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
sTotDiam = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM)
sBlockedAxis = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
break
end
@@ -2320,7 +2424,7 @@ function FindFirstToolOnHeadSet( nHSet)
EgtSetCurrMachining( CurrMachId or GDB_ID.NULL)
EgtTdbSetCurrTool( CurrTool or '')
-- restituisco risultato
return sTool, sHead, sTcPos, sTTotLen, sBlockedAxis
return sTool, sHead, sTcPos, sTTotLen, sTotDiam, sBlockedAxis
end
---------------------------------------------------------------------
+38 -7
View File
@@ -574,7 +574,11 @@ function OnPostApplyMachining()
-- Verifico flag di separazione e fase di scarico
local sNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
local bPreSplit = ( false and sNotes:find( 'Presplit', 1, true) ~= nil)
-- bPreSplit sempre a falso per obbligare a pinzare il pezzo con 1 morsa anche se iniziato il taglio che dividerà grezzo e finito (in genere per sezioni grandi con 2 tagli di lama)
-- Tra un taglio e l'altro infatti c'e' inversione del braccio e quindi un'apertura delle rulliere. Se pinzano entrambe le pinze, potrebbero esserci problemi di collisone rulli-morse
local bPreSplit = false --( sNotes:find( 'Presplit', 1, true) ~= nil)
local bSplitting = ( sNotes:find( 'Split', 1, true) ~= nil)
local bPreCut = ( sNotes:find( 'Precut', 1, true) ~= nil)
local bCutting = ( sNotes:find( 'Cut', 1, true) ~= nil)
@@ -655,6 +659,14 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
-- Verifico se lavorazione pareti
local bWall = ( EgtGetInfo( EgtGetCurrMachGroup() or GDB_ID.NULL, 'Wall', 'd') == 1)
-- mi salvo info lavorazione su una lista
local AuxInfoMach = {}
AuxInfoMach.bPreSplit = bPreSplit
AuxInfoMach.bSplitting = bSplitting
AuxInfoMach.bPreCut = bPreCut
AuxInfoMach.bCutting = bCutting
AuxInfoMach.bUnload = bUnload
-- Assegno flag di pezzo separato dal resto del grezzo
SPLIT = IsEndPhase( EMC.PHASE)
@@ -741,7 +753,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
local dPosT = LoadT
local vCmd = SpecCalcLoad( dPosT, dDistFront, max( dDistBack, MinJoin, EMC.LB - ( MaxY1 - MinY1) + 6))
EMC.LOAD = true
local vCmd2 = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar)
local vCmd2 = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar, AuxInfoMach)
EMC.LOAD = nil
if bSplitting and EMC.ERR == 18 then
table.insert( vCmd, { 22, dRollBack, -dRollFront})
@@ -754,7 +766,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
-- Se altrimenti non eseguito SPLIT, eseguo calcoli per carrelli
elseif not SPLIT then
local vCmd = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar)
local vCmd = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar, AuxInfoMach)
-- Se non ci sono spostamenti, confermo i parametri di aggancio e di posizione roller
if SpecTestOnlyRemarkInCmds( vCmd) then
table.insert( vCmd, { 21, EgtIf( EMC.Y1DELTA, EMC.Y1DELTA, 0), EgtIf( EMC.Y2DELTA, EMC.Y2DELTA, 0)})
@@ -883,7 +895,7 @@ function SpecialCalcMachiningEncumbrance( nMchId, bPreCut)
EgtSetAxisPos( 'A2', vAxMid[6])
end
b3Enc = EgtGetBBoxGlob( EgtGetAxisId( 'C2'), GDB_BB.ONLY_VISIBLE)
else -- 'H31'
else -- testa 3
EgtSetAxisPos( 'C3', vAxMid[4])
EgtSetAxisPos( 'B3', vAxMid[5])
b3Enc = EgtGetBBoxGlob( EgtGetAxisId( 'C3'), GDB_BB.ONLY_VISIBLE)
@@ -991,7 +1003,11 @@ function SpecCalcLoad( dPosT, dDistFront, dDistBack)
local dNewY1min = max( EMC.LB - dDistBack, MinOther + AggLoad + EMC.HCING + EMC.HOVM)
local dNewY1max = min( ( MaxY1 - MinY1) - 5, EMC.LB - MinJoin)
if dNewY1min > dNewY1max then return nil end
local dNewY1Delta = EgtClamp( BD.CHAR_LOAD_DIST or 3000, 0.75 * dNewY1min + 0.25 * dNewY1max, 0.25 * dNewY1min + 0.75 * dNewY1max)
-- minimo posizionamento pinza 1 per permettere scarico del restante
local dMinLengthRestToUnload = abs( MinY1) + abs( MinV1) + abs( MaxV2) + abs( MaxY2) + MinJoin + AggLoad + EMC.LT + 10
-- calcolo posizionamento con i coefficienti, ma verifico che sia tra il minimo e il massimo pinzabile
local dNewY1DeltaMax = EgtClamp( 0.25 * dNewY1min + 0.75 * dNewY1max, dMinLengthRestToUnload, dNewY1max)
local dNewY1Delta = EgtClamp( BD.CHAR_LOAD_DIST or 3000, 0.75 * dNewY1min + 0.25 * dNewY1max, dNewY1DeltaMax)
local dNewY2Delta = nil
local dNewY1 = dPosT + dNewY1Delta
local vCmd = {}
@@ -1035,7 +1051,7 @@ function SpecCalcLoad( dPosT, dDistFront, dDistBack)
end -- SpecAdjustLoad [L]
---------------------------------------------------------------------
function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar)
function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar, AuxInfoMach)
local MinFrontJoin = MinJoin + EMC.HCING + EMC.HOVM
local MyMinOther = MinOther + EgtIf( EMC.CNT == 1, AggLoad, 0)
@@ -1069,11 +1085,19 @@ function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1Del
WorkTab.dY1DeltaMaxF = min( EMC.LB - MinJoin, MaxY1 + dDistFront + dRollFront + AGG_V)
WorkTab.dY2DeltaMinF = nil
WorkTab.dY2DeltaMaxF = nil
if dY1DeltaMaxSP then WorkTab.dY1DeltaMaxF = min( WorkTab.dY1DeltaMaxF, dY1DeltaMaxSP) end
WorkTab.dV1PosF = dRollBack
WorkTab.bV1CloseF = false
WorkTab.dV2PosF = -dRollFront
WorkTab.bV2CloseF = false
-- dopo che si è calcolato il minimo e massimo dell'intervallo, verifico che in testa rimanga almeno il minimo per poter fare passaggio pinze e scaricare
if AuxInfoMach and ( AuxInfoMach.bSplitting or AuxInfoMach.bCutting) then
if WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 1.5 * BD.CHAR_EXTRA_DIST and WorkTab.dY1DeltaMaxF > EMC.LT + BD.MINRAW_S + BD.CHAR_EXTRA_DIST then
WorkTab.dY1DeltaMinF = max( min( EMC.LT + BD.MINRAW_S, WorkTab.dY1DeltaMaxF - 1), WorkTab.dY1DeltaMinF)
end
end
-- verifico validità intervallo ammesso per Y1
if WorkTab.dY1DeltaMinF > WorkTab.dY1DeltaMaxF + 10 * GEO.EPS_SMALL then
EMC.ERR = 18
@@ -1110,6 +1134,13 @@ function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1Del
WorkTab.dV2PosF = -dRollFront
WorkTab.bV2CloseF = false
-- dopo che si è calcolato il minimo e massimo dell'intervallo, verifico che in testa rimanga almeno il minimo per poter fare passaggio pinze e scaricare
if AuxInfoMach and ( AuxInfoMach.bSplitting or AuxInfoMach.bCutting) then
if WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 1.5 * BD.CHAR_EXTRA_DIST and WorkTab.dY1DeltaMaxF > EMC.LT + BD.MINRAW_S + BD.CHAR_EXTRA_DIST then
WorkTab.dY1DeltaMinF = max( min( EMC.LT + BD.MINRAW_S, WorkTab.dY1DeltaMaxF - 1), WorkTab.dY1DeltaMinF)
end
end
-- verifico validità intervallo ammesso per Y1
if WorkTab.dY1DeltaMinF > WorkTab.dY1DeltaMaxF + 10 * GEO.EPS_SMALL then
EMC.ERR = 18
@@ -1988,7 +2019,7 @@ local function PosY2Y1B( TabI, vCmd)
if TabI.dY2PosI > MinY2 and
TabI.dY2PosI > TabI.dTPosI + MinJoin + EMC.HOVM + EMC.HCING - 10 * GEO.EPS_SMALL then
-- allontanamento morse, trascinamento trave con Y2
MaxDispl( TabI, vCmd, 'M2')
MaxDispl( TabI, vCmd, 'M2')
else
-- accentramento morse, trascinamento trave con Y1
MaxDispl( TabI, vCmd, 'M3')
+71
View File
@@ -1,5 +1,76 @@
==== Common_PF1250 Update Log ====
Versione 2.6j3 (25/10/2024)
- (GEN) Piccola correzione per capire se testa 3 presente
- (SIM-GEN) In caso di lavorazione successiva alla prima, rivisto primo posizionamento alla quota Z di lavoro se precedentemente spostati a quota rotazione assi rotanti.
Versione 2.6j2 (23/10/2024)
- (MLDE-SIM) Aggiunto parametro ParkTc1X1 in MLDE per simulazione quota parcheggio Testa 1 su TC1.
- (SIM-GEN) Per movimento a ZMAX si considera utensile attuale o precedente
- (SIM-GEN) Prima versione con gestione testa 3 dedicata lama
Versione 2.6j1 (01/10/2024)
- (GEN) Migliorato calcolo chiusura paratia rulli con aggiornamento lunghezza della barra in caso di ultimo taglio e grezzo residuo in coda. Ticket#2017
- (NGE-SIM) Aggiunta gestione solidi collisione per TC verticali e TC rotante sotto
- (GEN) Per lavorazione in doppio: messaggio bloccante in caso di extra-corsa durante un movimento standard su piano generico della lavorazione.
Versione 2.6i1 (10/09/2024)
- (GEN) Se diametro utensile più del truciolatore standard grande, non si preseleziona. Ticket#2028
Versione 2.6h2 (28/08/2024)
- (SIM-GEN) Quando si aprono i rulli, se la trave non può seguire i rulli perchè la pinza andrebbe in extra-corsa, si sposta comunque la pinza fino al massimo della sua corsa. Ticket#1949
- (GEN) La testa veniva spostata a quota X sicurezza rotazione assi rotanti prima di aprire le rulliere. Ticket#1991
Versione 2.6h1 (07/08/2024)
- (GEN) Gestione creazione piano generico in caso il primo movimento della lavorazione sia un arco. Ticket#1891
- (SIM-GEN) Migliorata gestione riposizionamenti fatta con la 2.6g1. Ticket#1836
- (MLDE-SIM-GEN) Rinominato file da "Common-" a "Common_" per uniformità con i file common delle altre macchine. Serve modifica a MLDE macchina.
Versione 2.6g5 (24/07/2024)
- (SIM) Per OnSetHead chiamata da simulazione, aggiunta lettura TOTDIAM. Serve per limitare corse assi testa sotto. Ticket#1946
Versione 2.6g4 (23/07/2024)
- (SIM) Corretta ultima modifica per controllo collisioni testa non utilizzata. Trovava collisioni in lavorazioni in doppio.
Versione 2.6g3 (22/07/2024)
- (SIM) Si aggiunge al controllo collisioni anche Tool e ToolHolder della testa non utilizzata. Ticket#1937
- (SIM-GEN) In caso di grezzo piuttosto piccolo, concesso pinzaggio fino al massimo possibile, oltre al calcolo con coefficienti. Ticket#1942
Versione 2.6g2 (12/07/2024)
- (SIM-GEN) Corretto movimento testa sotto che andava in collisione tra una lavorazione e la successiva se tra le due c'era un riposizionamento pinze. Ticket#1925
Versione 2.6g1 (08/07/2024)
- (SIM-GEN) Corretto movimento che pinzava nel vuoto durante riposizionamento. Ticket#1836
Versione 2.6f2 (06/06/2024)
- (GEN) Quando si va a ZMAX, si azzerano tutte le coordinate ".pp". Scriveva una Z bassa quando era a Z massima. Ticket#1839
Versione 2.6f1 (03/06/2024)
- (SIM-GEN) Migliorata gestione approccio al pezzo con lama aggregato da sotto. Va al minimo in X solo se necessario.
Versione 2.6e6 (28/05/2024)
- (GEN) Aggiunta possibilità di scrivere nome utensile doppio anche in lavorazione con parametro "TOOLDOUBLE". Note sulla lavorazione hanno precedenza su note utensile.
- (GEN) Ripristinato controllo extra-corsa per testa 2 in caso di lavorazioni in doppio in Y (si era perso in un vecchio commit)
- (SIM-GEN) Corretto movimento testa sotto su prima lavorazione. Ruotava a parcheggio invece di andare a quota sicurezza rotazione assi.
Versione 2.6e5 (23/05/2024)
- (GEN) Controllo extra-corsa per testa 2 in caso di lavorazioni in doppio in Y
- (GEN) Corretta lettura e salvataggio coordinala asse L2 con coordinate rispetto origine. Prima erano locali e sbagliava alcuni calcoli
- (SIM-GEN) Se lavorazione con testa 2 e stesso utensile, piccola correzione che manda a parcheggio se cambiano assi rotanti solo se si trova a ZMAX
Versione 2.6e4 (15/05/2024)
- (SIM-GEN) Miglioramento gestione lama su aggregato da sotto
Versione 2.6e3 (09/05/2024)
- (SIM) Corretto prelievo lama 2 (H16). Prima di visualizzare utensile, si sposta la Z alla quota massima. Prima trovava collisione in caso utensile precedente non lama (perchè era già oltre la quota massima).
Versione 2.6e2 (06/05/2024)
- (GEN) In parcheggio paratie/pinze, viene considerato sovramateriale di testa. Simulazione era corretta. Ticket#1789
Versione 2.6e1 (30/04/2024)
- (SIM-GEN) Per macchina a 3 teste, ripristinato posizionamento testa 2 tramite parametro ParkInLavZ2. La gestione era stata persa dal common.
- (MLDE-GEN) Gestione facoltativa parametro WOOD_DENSITY settabile in Ts3. In MLDE, mettere il valore di WOOD_DENSITY nella nostra variabile 'WoodDensity'.
Versione 2.6d2 (23/04/2024)
- (MLDE-GEN) Aggiunto parametro 'IS_TEST_MACHINE' FACOLTATIVO. Se non esiste o 'false' è macchina standard, se 'true' è una macchina utilizzata per i test Egalware interni
- (GEN) Chiamando la macchina con un nome che termini con '.TEST' si abilita come macchina per test interni, equivalente a settare 'IS_TEST_MACHINE' (che comunque rimane)
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_PF1250', -- nome script PP standard
VERSION = '2.6d2', -- versione script
VERSION = '2.6j3', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}