diff --git a/Common_PF1250.TPA.mlpe b/Common_PF1250.TPA.mlpe index 8ef4944..937fa1c 100644 --- a/Common_PF1250.TPA.mlpe +++ b/Common_PF1250.TPA.mlpe @@ -864,8 +864,8 @@ function OnRapid() EmitParkRoller( dPosT, bSplitCut) end -- 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}) + if ( not EMT.L2pp or ( EMT.L2pp and EMT.L2pp > SafeX2RotAxis)) and ( ParkB2 ~= EMT.R2 or ParkC2 ~= EMT.R1) then + EmitMoveDataHead( 2, { X=SafeX2RotAxis, 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 @@ -1200,20 +1200,20 @@ function OnRapid() end -- scrivo solo se gli assi rotanti sono cambiati EmitMoveDataHead( 2, { Z=-dSafeZ2, S=Speed}) - 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}) + if EMT.L2pp > SafeX2RotAxis and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then + EmitMoveDataHead( 2, { X=SafeX2RotAxis, Z=-dSafeZ2, B=CurrB2, C=CurrC2, S=Speed}) end else -- scrivo solo se gli assi rotanti sono cambiati - 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}) + if EMT.L2pp > SafeX2RotAxis and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then + EmitMoveDataHead( 2, { X=SafeX2RotAxis, 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.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}) + if EMT.ZMAX and EMT.L2pp > SafeX2RotAxis and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then + EmitMoveDataHead( 2, { X=SafeX2RotAxis, Z=-dSafeZ2, B=CurrB2, C=CurrC2, S=Speed}) end end -- scrivo solo se gli assi rotanti sono cambiati @@ -2843,9 +2843,12 @@ function PreselectNextDiffHead( nMchId, sHead) -- faccio preselezione ( se sono arrivato qui, vuol dire che posso preselezionare) if nNextHSet == 1 then local dNextX - -- se sto lavorando con testa 3, la testa 1 deve restare in home + -- se sto lavorando con testa 3, la testa 1 preselezionata deve restare in home if nHSet == 3 then - dNextX = EgtGetAxisHomePos( 'X1') + dNextX = - EgtGetAxisHomePos( 'X1') + -- se il prossimo utensile su testa 1 è utensile lungo, resta in home + elseif sNextHead == 'H11' and dNextTotLen > LongTool then + dNextX = - EgtGetAxisHomePos( 'X1') -- altrimenti recupero quota X1 (nostro L2) else dNextX = GetStartMachiningXaxis( nNextMchId) @@ -2857,7 +2860,7 @@ function PreselectNextDiffHead( nMchId, sHead) EmitMoveDataHead( 1, { X=dNextX, B=ParkB1, C=ParkC1, TPos=AdjustTcPos( false, sNextTcPos), Fmt=2}) else local nNextTc = GetTcForTopHeadTool( sNextTcPos) - EmitMoveDataHead( 1, { X=dNextX, B=ParkLongB1, C=EgtIf( nPrevTc ~= 2, ParkLongTc1C1, ParkLongTc2C1), TPos=AdjustTcPos( false, sNextTcPos), Fmt=2}) + EmitMoveDataHead( 1, { X=dNextX, B=ParkLongB1, C=EgtIf( nNextTc ~= 2, ParkLongTc1C1, ParkLongTc2C1), TPos=AdjustTcPos( false, sNextTcPos), Fmt=2}) end EmitMoveStartHead( 1) elseif sNextHead == 'H12' or sNextHead == 'H16' then diff --git a/Common_PF1250.mlpe b/Common_PF1250.mlpe index 6b707ac..021f64b 100644 --- a/Common_PF1250.mlpe +++ b/Common_PF1250.mlpe @@ -463,6 +463,8 @@ function OnSimulToolSelect( dPosA) end if EMT.HEAD == 'H12' or EMT.HEAD == 'H16' then EgtSetAxisPos( 'Z1', MaxZ1Blade) + elseif EMT.HEAD == 'H13' then + EgtSetAxisPos( 'Z1', ParkCSawZ1) else EgtSetAxisPos( 'Z1', MaxZ1) end @@ -573,7 +575,7 @@ function OnSimulToolDeselect( dPrevA) -- visualizzo utensile su TcPos ShowToolInTcPos( EMT.PREVTCPOS_H2, true) -- nascondo l'utensile sulla testa - EgtSetStatus( EgtGetHeadId( EMT.PREVHEAD_H2 or '') or GDB_ID.NULL, GDB_ST.OFF) + EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H2 or '') or GDB_ID.NULL, GDB_MD.HIDDEN) -- se testa gruppo 1 elseif nNextSetHead == 1 and EMT.PREVTCPOS_H1 then -- deposito utensile fresa @@ -648,10 +650,10 @@ function OnSimulToolDeselect( dPrevA) sTool = vTools[1] sTcPos = DefTcPos1 sHead = GetAdjHeadFromTcPos( 1, sTcPos) + -- carico l'utensile + EgtLoadTool( sHead, 1, sTool) + ShowToolInTcPos( DefTcPos1, false) end - -- carico l'utensile - EgtLoadTool( sHead, 1, sTool) - ShowToolInTcPos( DefTcPos1, false) EMT.PREVTOOL_H1 = sTool EMT.PREVHEAD_H1 = sHead EMT.PREVTCPOS_H1 = DefTcPos1 @@ -1100,8 +1102,8 @@ function OnSimulMoveStart() end SimulMoveAxis( 'Z2', Z2Home, MCH_SIM_STEP.RAPID) -- 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) + if X2Pos > SafeX2RotAxis and ( B2Pos ~= EMT.R2 or C2Pos ~= EMT.R1) then + SimulMoveAxis( 'X2', SafeX2RotAxis, MCH_SIM_STEP.RAPID) end end else @@ -1110,8 +1112,8 @@ function OnSimulMoveStart() SimulMoveAxis( 'Z2', Z2Home, MCH_SIM_STEP.RAPID) end -- Porto la X alla giusta quota - if EMT.ZMAX and X2Pos > ParkMchY2 and ( B2Pos ~= EMT.R2 or C2Pos ~= EMT.R1) then - SimulMoveAxis( 'X2', ParkMchY2, MCH_SIM_STEP.RAPID) + if EMT.ZMAX and X2Pos > SafeX2RotAxis and ( B2Pos ~= EMT.R2 or C2Pos ~= EMT.R1) then + SimulMoveAxis( 'X2', SafeX2RotAxis, MCH_SIM_STEP.RAPID) end end if EMT.HEAD == 'H22' then @@ -1316,7 +1318,7 @@ function OnSimulMoveEnd() -- ricavo prossimo utensile local sNextTool = GetNextTool( EMT.MCHID) -- vado in home se è ultimo movimento ed è ultima lavorazione - local bToXhome = ( IsLastPath( EMT.PATHID) and not sNextTool and nHSet == 3) + local bToXhome = ( IsLastPath( EMT.PATHID) and not sNextTool and nHSet == 3) or ( nHSet == 1 and EMT.TTOTLEN > LongTool) -- eseguo ExecMoveZmax( EMT.MCHSPLIT, bToXhome) EMT.TO_ZMAX = nil @@ -1487,7 +1489,9 @@ function ExecStartHome() EgtResetAxisPos( 'C1') EgtResetAxisPos( 'B1') -- Testa 2 - EgtSetAxisPos( 'X2', SafeX2) + local _, sHead, _, _, _, _ = FindFirstToolOnHeadSet( 2) + local PosXStart = EgtIf( sHead == 'H22', SafeX2, ParkX2) + EgtSetAxisPos( 'X2', PosXStart) EgtSetAxisPos( 'Z2', MinZ2) EgtResetAxisPos( 'C2') EgtResetAxisPos( 'B2') @@ -1497,11 +1501,12 @@ end function ExecMoveHome( bNearV, bMchSplit) -- risalita a Zmax ExecMoveZmax( bMchSplit, true) - -- se testa sotto e macchian a 3 teste e gruppo truciolatore a 4 assi + -- se testa sotto e macchina a 3 teste if GetHeadSet( EMT.HEAD) == 2 and IsHeadExisting( 3) then - if not SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID) then + if not SimulMoveAxis( 'X2', EgtIf( EMT.HEAD == 'H22', SafeX2, ParkX2), MCH_SIM_STEP.RAPID) then EgtOutLog( 'Error on MoveHome : X2') end + -- se gruppo truciolatore a 4 assi if EgtGetHeadId( 'H39') then if not SimulMoveAxis( 'Z2', ParkInLavZ2, MCH_SIM_STEP.RAPID) then EgtOutLog( 'Error on MoveHome : Z2') @@ -1561,6 +1566,9 @@ function ExecMoveZmax( bMchSplit, bGoToHome) SimulMoveAxis( 'B1', HomeB, MCH_SIM_STEP.COLLROT) end SimulMoveAxis( 'Z1', MyMaxZ1, MCH_SIM_STEP.RAPID) + if bGoToHome then + SimulMoveAxis( 'X1', ParkX1, MCH_SIM_STEP.RAPID) + end -- altrimenti sega a catena else -- salgo in Z sicurezza raddrizzando la B @@ -2589,7 +2597,7 @@ function GetNextChainSawingVirtualAxis( MchId) -- la imposto come lavorazione corrente EgtSetCurrMachining( NextMchId) -- recupero il valore dell'asse virtuale bloccato A - local dPosA = GetCurrMultiDrillVirtualAxis() + local dPosA = GetCurrChainSawingVirtualAxis() -- ripristino la lavorazione corrente if MchId then EgtSetCurrMachining( MchId) @@ -2616,7 +2624,7 @@ function GetNextMultiDrillVirtualAxis( MchId) -- la imposto come lavorazione corrente EgtSetCurrMachining( NextMchId) -- recupero il valore dell'asse virtuale bloccato A - local dPosA = GetCurrChainSawingVirtualAxis() + local dPosA = GetCurrMultiDrillVirtualAxis() -- ripristino la lavorazione corrente if MchId then EgtSetCurrMachining( MchId) diff --git a/Common_PF1250.mlse b/Common_PF1250.mlse index fc24a06..94efe56 100644 --- a/Common_PF1250.mlse +++ b/Common_PF1250.mlse @@ -77,6 +77,8 @@ function OnSpecialGetMaxZ() EMC.MAXZ = MaxZ1Blade - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130) elseif vtTp:getZ() > 0.707 or vtT:getZ() > 0.707 then EMC.MAXZ = ParkZ1 + 200 + elseif vtTp:getZ() > 0.5 or vtT:getZ() > 0.5 then + EMC.MAXZ = ParkZ1 + 100 else EMC.MAXZ = ParkZ1 + 1 end @@ -95,6 +97,8 @@ function OnSpecialGetMaxZ() EMC.MAXZ = MaxZ1Blade - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130) elseif vtTp:getZ() > 0.707 or vtT:getZ() > 0.707 then EMC.MAXZ = ParkZ1 + 200 + elseif vtTp:getZ() > 0.5 or vtT:getZ() > 0.5 then + EMC.MAXZ = ParkZ1 + 100 else EMC.MAXZ = ParkZ1 + 1 end @@ -205,7 +209,7 @@ local SIC_V = 50 -- sicurezza da testa local MIN_ENG_V = 115 -- ingombro asse Z local MIN_ENG_RACK_V = 161 -- ingombro asse Z con cremagliera local MIN_ENG_XZ2_V = 180 -- ingombro assi XZ sotto -local MIN_Z2_FOR_ENG_XZ2_V = 270 -- quota Z2 da cui considerare ingombro assi XZ sotto +local MIN_Z2_FOR_ENG_XZ2_V = 250 + EgtIf( MaxZ2 > 1100, 300, 0) -- quota Z2 da cui considerare ingombro assi XZ sotto local AGG_V = MinDeltaYV -- ingombro rulli pressori + sicurezza local MaxLenSmT = 1500 -- massima lunghezza pezzo scaricato con nastri verdi local DIST_Y1MAX_LOAD = 100 -- distanza carrello Y1 da massimo asse al carico diff --git a/Essetre-PF1500MAXrl-3T.ini b/Essetre-PF1500MAXrl-3T.ini index 0ba13f7..33c4d51 100644 --- a/Essetre-PF1500MAXrl-3T.ini +++ b/Essetre-PF1500MAXrl-3T.ini @@ -26,6 +26,7 @@ H21.1:MILL_NOTIP=MillNoTip.nge H21.1:SAW_STD=SawH2Std.nge H21.1:SAW_FLAT=SawH2Flat.nge H22.1=Saw.nge +H38.1=SawH3Std.nge [Machinings] Drilling=1 diff --git a/Essetre-PF1500MAXrl-3T.mlde b/Essetre-PF1500MAXrl-3T.mlde index 2947706..4e47762 100644 --- a/Essetre-PF1500MAXrl-3T.mlde +++ b/Essetre-PF1500MAXrl-3T.mlde @@ -5,8 +5,8 @@ require( 'EmtGenerator') EgtEnableDebug( false) -PP_VER = '2.6k2_DEV12' -PP_NVER = '2.6.11.2' +PP_VER = '2.7b3' +PP_NVER = '2.7.2.3' MIN_MACH_VER = '2.5k1' MACH_NAME = 'Essetre-PF1500MAXrl-3T' @@ -143,6 +143,7 @@ MinB2b = -119 MaxB2b = 119 ParkX2 = -100 SafeX2 = -400 +SafeX2RotAxis = -1000 ParkZ2 = 0 ParkInLavZ2 = 200 ParkC2 = -90 diff --git a/THolders/SawH3Std.nge b/THolders/SawH3Std.nge new file mode 100644 index 0000000..1e2fd9d Binary files /dev/null and b/THolders/SawH3Std.nge differ diff --git a/UpdateLog.txt b/UpdateLog.txt index a351473..1d02d3b 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,40 @@ ==== Common_PF1250 Update Log ==== +Versione 2.7b3 (06/02/2025) +- (SIM) Dopo aver scaricato utensile, si setta nota "HIDDEN" per dichiarare utensile non più sulla testa e non considerare le collisioni. + +Versione 2.7b2 (04/02/2025) +- (SIM-GEN) Piccola modifica nel calcolo posizione dei rulli di pinzaggio. + +Versione 2.7b1 (03/02/2025) +- (SIM) Corretta simulazioen che non mandava testa in home in caso di utensile lungo. Generazione era già ok. Ticket#2280 + +Versione 2.7a2 (28/01/2025) +- (SIM-GEN) In MLSE aggiunta piccola correzione quota Z in caso di direzione Z tra 0.5 e 0.707. + +Versione 2.7a1 (17/01/2025) +- (GEN) Piccola correzione posizione X in preselezione utensile +- (GEN) Corretto primo punto X preselezione utensile. Ticket#2183 e #2250 + +Versione 2.6l7 (19/12/2024) +- (SIM) HOTFIX : corretto posizione Z zero alla selezione dell'utensile in caso di motosega. Ticket#2235 + +Versione 2.6l6 (18/12/2024) +- (MLDE-SIM-GEN) Aggiunta variabile 'SafeX2RotAxis' in sostituzione della 'ParkMchY2' che era usata impropriamente + +Versione 2.6l5 (17/12/2024) +- (SIM) Corretta posizione iniziale testa 2. Ticket#2228 + +Versione 2.6l4 (16/12/2024) +- (SIM-GEN) In MLSE ripristinati vecchi valori indici calcolo Z massima. In alcuni casi peggioravano la situazione. + +Versione 2.6l3 (16/12/2024) +- (SIM) Corretto scarico utensile se aggregato. Se non presente utensile di default, non seleziona nulla. +- (SIM-GEN) In MLSE ritoccati indici calcolo Z massima. Ticket#2210 + +Versione 2.6l2 (13/12/2024) +- (SIM) Corretta chiamata calcolo asse virtuale + Versione 2.6l1 (13/12/2024) - (SIM) Gestione caricamento utensili in caso di testa con uscita multipla. - (SIM) Corretto errore di collisione per errata simulazione cambio utensile da lama a motosega. @@ -9,7 +44,7 @@ Versione 2.6l1 (13/12/2024) - (SIM-GEN) A fine barra, testa 3 sempre in home - (GEN) Controllo esistenza terzo asse ausiliario - (GEN) Corretto primo movimento in X quando si parte con testa 3. Ticket#2216 -- (GEN) Se su testa 1 c'è un aggregato e si utilizzerà la testa 3, si pscarica aggregato e si prende utensile di default. Ticket#2222 +- (GEN) Se su testa 1 c'è un aggregato e si utilizzerà la testa 3, si scarica aggregato e si prende utensile di default. Ticket#2222 - (GEN) Durante utilizzo della testa 3, non si preselezionano altre teste. Ticket#2220 - (SIM-GEN) Se lavorazione con testa dedicata lama e su testa 1 c'era aggregato, viene scaricato. Ticket#2216 diff --git a/Version.lua b/Version.lua index da2326c..e995deb 100644 --- a/Version.lua +++ b/Version.lua @@ -3,7 +3,7 @@ local InfoCommon_STD_PP = { NAME = 'Common_PF1250', -- nome script PP standard - VERSION = '2.6l1', -- versione script + VERSION = '2.7b3', -- versione script MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel }