diff --git a/Common_FAST.NUM.mlpe b/Common_FAST.NUM.mlpe index 9980e76..07d2cf4 100644 --- a/Common_FAST.NUM.mlpe +++ b/Common_FAST.NUM.mlpe @@ -649,7 +649,7 @@ function OnRapid() local sES = ' ES'..EgtNumToString( EMT.S, 0) -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione - if EMT.HEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then + if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4') local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES @@ -838,6 +838,11 @@ function OnRapid() -- non previsto -- se altrimenti rotazione a Z max per lavorazione successiva elseif EMT.FLAG == 5 then + EMT.REFLOC = nil + EMT.IPLGL = false + MyAdjustLinearAxes() + EmtAdjustRotaryAxes() + EmtResetPrev() -- ricavo i dati per la lavorazione local sEE = ' EE3' local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3) diff --git a/Common_FAST.NUM_PLUS.mlpe b/Common_FAST.NUM_PLUS.mlpe index bfff4fc..205957f 100644 --- a/Common_FAST.NUM_PLUS.mlpe +++ b/Common_FAST.NUM_PLUS.mlpe @@ -713,7 +713,7 @@ function OnRapid() local sES = ' ES'..EgtNumToString( EMT.S, 0) -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione - if EMT.HEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then + if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4') local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES @@ -912,6 +912,11 @@ function OnRapid() -- non previsto -- se altrimenti rotazione a Z max per lavorazione successiva elseif EMT.FLAG == 5 then + EMT.REFLOC = nil + EMT.IPLGL = false + MyAdjustLinearAxes() + EmtAdjustRotaryAxes() + EmtResetPrev() -- ricavo i dati per la lavorazione local sEE = ' EE3' local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3) diff --git a/Common_FAST.TPA.mlpe b/Common_FAST.TPA.mlpe index 13afb08..e683a67 100644 --- a/Common_FAST.TPA.mlpe +++ b/Common_FAST.TPA.mlpe @@ -663,7 +663,7 @@ function OnRapid() end -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione - if EMT.HEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then + if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, 3) .. ' P3=' .. EmtLenToString( MyZHome, 3) .. ' P4=' .. EgtNumToString( EMT.R2, 3) .. ' P5=' .. EgtNumToString( EMT.R1, 3) .. ' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) .. @@ -854,6 +854,11 @@ function OnRapid() -- non previsto -- se altrimenti rotazione a Z max per lavorazione successiva elseif EMT.FLAG == 5 then + EMT.REFLOC = nil + EMT.IPLGL = false + MyAdjustLinearAxes() + EmtAdjustRotaryAxes() + EmtResetPrev() local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, 3) .. ' P3=' .. EmtLenToString( EMT.L3, 3) .. ' P4=' .. EgtNumToString( EMT.R2, 3) .. ' P5=' .. EgtNumToString( EMT.R1, 3) .. ' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) .. diff --git a/Common_FAST.mlpe b/Common_FAST.mlpe index 9f9d720..ecfeee3 100644 --- a/Common_FAST.mlpe +++ b/Common_FAST.mlpe @@ -662,6 +662,7 @@ function OnSimulMachiningEnd() EMT.FALL = false end EMT.PREVHEAD = EMT.HEAD + EMT.PREVTOOL = EMT.TOOL EMT.PREVEXIT = EMT.EXIT end @@ -749,10 +750,12 @@ function OnSimulMoveStart() if EMT.MCHFIRST then EgtOutText( '') EMT.MCHFIRST = false + local bZmax = ( EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1) + -- con pezzi alti aggiorno gli assi rotanti prima di muovermi sopra il pezzo if not EMT.LOAD and EMT.MOVE == 0 and EMT.HB > BeamHeightForFixRot and EMT.FLAG2 == 1 then -- se motosega mi muovo a X di sicurezza per ruotare - if EMT.HEAD == 'H3' then + if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TOTLEN > 200)) then SimulMoveAxes( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID, 'C', EMT.R1, MCH_SIM_STEP.COLLROT, 'B', EMT.R2, MCH_SIM_STEP.COLLROT) end end diff --git a/UpdateLog.txt b/UpdateLog.txt index 7539012..c167a31 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,6 +1,6 @@ ==== Common_FAST Update Log ==== -Versione 2.6-- (--/--/2024) +Versione 2.6i5 (24/09/2024) - (SIM-GEN) Tolto controllo su lunghezza maggiore di 200mm introdotto con 2.6i2 perchè non completamente funzionante - (GEN) Gestione in OnRapid() di EMT.FLAG=5 (rotazione a Z max per lavorazione successiva). Ora allineata alla simulazione diff --git a/Version.lua b/Version.lua index 8286281..8ee9825 100644 --- a/Version.lua +++ b/Version.lua @@ -3,7 +3,7 @@ local InfoCommon_STD_PP = { NAME = 'Common_FAST', -- nome script PP standard - VERSION = '2.6--', -- versione script + VERSION = '2.6i5', -- versione script MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel }