From 82f0eab4aef0a330031bc3a3bff9446cd64f4e5d Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Mon, 30 Mar 2026 18:29:31 +0200 Subject: [PATCH] - Corretti moviemnti con motosega. Ora si ruota la C con B sempre a zero, anche alla posizione X di sicurezza - Cambio versione per rilascio a cliente --- Common_FAST.NUM.mlpe | 31 ++++++++++++++---------- Common_FAST.NUM_PLUS.mlpe | 33 +++++++++++++++----------- Common_FAST.TPA.mlpe | 50 ++++++++++++++++++++++++++------------- Common_FAST.mlpe | 28 +++++++++------------- UpdateLog.txt | 3 +++ Version.lua | 2 +- 6 files changed, 85 insertions(+), 62 deletions(-) diff --git a/Common_FAST.NUM.mlpe b/Common_FAST.NUM.mlpe index d060715..1567408 100644 --- a/Common_FAST.NUM.mlpe +++ b/Common_FAST.NUM.mlpe @@ -510,6 +510,7 @@ function OnPathStart() -- salvo precedenti rotanti EMT.R1pp = EMT.R1p EMT.R2pp = EMT.R2p + EMT.R3pp = EMT.R3p -- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento) EmtResetPrev() @@ -634,7 +635,7 @@ function OnRapid() local bGoToHome = false -- se gli assi rotanti cambiano parecchio, con motosega si va in parcheggio - if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and sET == EMT.PREVET and ( abs( EMT.R2pp - EMT.R2) > 25 or abs( EMT.R1pp - EMT.R1) > 25) then + if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and ( sET ~= EMT.PREVET or abs( EMT.R2pp - EMT.R2) > 25 or abs( EMT.R1pp - EMT.R1) > 25) then bGoToHome = true end @@ -646,12 +647,14 @@ function OnRapid() -- se avevo motosega, torno in zona sicura senza ruotare assi rotanti if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.FLAG2 == 1 then + -- se ho ancora motosega, si setta già asse C, altrimenti asse C per andare in home local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. ' B' .. EmtLenToString( EMT.R2pp, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) .. ' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES EmtOutput( sOutPreMove) sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. - ' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1pp, 3) .. sEE .. sEL .. sER .. sET .. sES + ' B' .. EmtLenToString( 0, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) .. + ' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES EmtOutput( sOutPreMove) EmtOutput( 'G101 ET1001') EmtOutput( 'G101 ET2001') @@ -663,24 +666,26 @@ function OnRapid() end -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione - if not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and + if EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then + local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. + ' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES + EmtOutput( sOutPreMove) + sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. + ' B' .. EgtNumToString( EMT.R2, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES + EmtOutput( sOutPreMove) + EmtOutput( 'G101 ET1001') + EmtOutput( 'G101 ET2001') + -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione + elseif not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and ( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome) and EMT.FLAG2 == 1 then - local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4') local sOutPreMove if EMT.HEAD == 'H3' and bGoToHome then sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. - ' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1pp, 3) .. sEE .. sEL .. sER .. sET .. sES - EmtOutput( sOutPreMove) - sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. - ' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES - EmtOutput( sOutPreMove) - elseif EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then - sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. - ' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES + ' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES EmtOutput( sOutPreMove) end sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. - ' B' .. EgtNumToString( EMT.R2, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES + ' B' .. EgtNumToString( EMT.R2, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES EmtOutput( sOutPreMove) EmtOutput( 'G101 ET1001') EmtOutput( 'G101 ET2001') diff --git a/Common_FAST.NUM_PLUS.mlpe b/Common_FAST.NUM_PLUS.mlpe index ee07262..1830ce8 100644 --- a/Common_FAST.NUM_PLUS.mlpe +++ b/Common_FAST.NUM_PLUS.mlpe @@ -558,6 +558,7 @@ function OnPathStart() -- salvo precedenti rotanti EMT.R1pp = EMT.R1p EMT.R2pp = EMT.R2p + EMT.R3pp = EMT.R3p -- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento) EmtResetPrev() @@ -683,7 +684,7 @@ function OnRapid() local bGoToHome = false -- se gli assi rotanti cambiano parecchio, con motosega si va in parcheggio - if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and sET == EMT.PREVET and ( abs( EMT.R2pp - EMT.R2) > 25 or abs( EMT.R1pp - EMT.R1) > 25) then + if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and ( sET ~= EMT.PREVET or abs( EMT.R2pp - EMT.R2) > 25 or abs( EMT.R1pp - EMT.R1) > 25) then bGoToHome = true end @@ -718,13 +719,15 @@ function OnRapid() -- se avevo motosega, torno in zona sicura senza ruotare assi rotanti if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.FLAG2 == 1 then + -- se ho ancora motosega, si setta già asse C, altrimenti asse C per andare in home local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. ' B' .. EmtLenToString( EMT.R2pp, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) .. ' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES EmtOutput( sOutPreMove) sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. - ' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES - EmtOutput( sOutPreMove) + ' B' .. EmtLenToString( 0, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) .. + ' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES + EmtOutput( sOutPreMove) EmtOutput( 'G101 ET1001') EmtOutput( 'G101 ET2001') end @@ -735,24 +738,26 @@ function OnRapid() end -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione - if not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and + if EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then + local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. + ' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES + EmtOutput( sOutPreMove) + sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. + ' B' .. EgtNumToString( EMT.R2, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES + EmtOutput( sOutPreMove) + EmtOutput( 'G101 ET1001') + EmtOutput( 'G101 ET2001') + -- ruoto in zona sicura prima di approcciare la lavorazione + elseif not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and ( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome) and EMT.FLAG2 == 1 then - local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4') local sOutPreMove if EMT.HEAD == 'H3' and bGoToHome then sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. - ' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1pp, 3) .. sEE .. sEL .. sER .. sET .. sES - EmtOutput( sOutPreMove) - sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. - ' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES - EmtOutput( sOutPreMove) - elseif EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then - sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. - ' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES + ' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES EmtOutput( sOutPreMove) end sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. - ' B' .. EgtNumToString( EMT.R2, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES + ' B' .. EgtNumToString( EMT.R2, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES EmtOutput( sOutPreMove) EmtOutput( 'G101 ET1001') EmtOutput( 'G101 ET2001') diff --git a/Common_FAST.TPA.mlpe b/Common_FAST.TPA.mlpe index 2d59882..ec30882 100644 --- a/Common_FAST.TPA.mlpe +++ b/Common_FAST.TPA.mlpe @@ -525,6 +525,9 @@ function OnMachiningEnd() EMT.PREVTOOL = EMT.TOOL EMT.PREVHEAD = EMT.HEAD EMT.PREVS = EMT.S + -- salvo posizione + EMT.PREVTCPOS = AdjustTcPos( false) + end --------------------------------------------------------------------- @@ -539,6 +542,7 @@ function OnPathStart() -- salvo precedenti rotanti EMT.R1pp = EMT.R1p EMT.R2pp = EMT.R2p + EMT.R3pp = EMT.R3p -- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento) EmtResetPrev() @@ -659,9 +663,11 @@ function OnRapid() end end + local sTcPosReal = AdjustTcPos( false) + local bGoToHome = false -- se gli assi rotanti cambiano parecchio, con motosega si va in parcheggio - if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and EMT.TCPOS == EMT.PREVTCPOS and ( abs( EMT.R2pp - EMT.R2) > 25 or abs( EMT.R1pp - EMT.R1) > 25) then + if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and ( sTcPosReal ~= EMT.PREVTCPOS or abs( EMT.R2pp - EMT.R2) > 25 or abs( EMT.R1pp - EMT.R1) > 25) then bGoToHome = true end @@ -676,9 +682,9 @@ function OnRapid() ' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4') EmtOutput( sOutPreMove) sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) .. - ' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1pp, EMT.DECMACRO) .. - ' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) .. - ' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4') + ' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1pp, EMT.DECMACRO) .. + ' P6=' .. EgtNumToString( EMT.PREVTCPOS, EMT.DECMACRO) .. ' P7=' .. EgtNumToString( EMT.PREVS, 0) .. + ' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4') EmtOutput( sOutPreMove) EmtOutput( 'M101 P1=2') EmtOutput( 'M101 P1=3') @@ -690,21 +696,33 @@ function OnRapid() end -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione - if not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and - ( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome) and EMT.FLAG2 == 1 then - local sOutPreMove - if EMT.HEAD == 'H3' and bGoToHome then - sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) .. - ' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1pp, EMT.DECMACRO) .. - ' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) .. - ' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4') - EmtOutput( sOutPreMove) - sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) .. + if EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then + local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) .. ' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) .. ' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) .. ' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4') + if EMT.LOAD then + ParkLine( sOutPreMove) + else EmtOutput( sOutPreMove) - elseif EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then + end + sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) .. + ' P4=' .. EgtNumToString( EMT.R2, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) .. + ' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) .. + ' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4') + if EMT.LOAD then + ParkLine( sOutPreMove) + ParkLine( 'M101 P1=2') + ParkLine( 'M101 P1=3') + else + EmtOutput( sOutPreMove) + EmtOutput( 'M101 P1=2') + EmtOutput( 'M101 P1=3') + end + elseif not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and + ( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome) and EMT.FLAG2 == 1 then + local sOutPreMove + if EMT.HEAD == 'H3' and bGoToHome then sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) .. ' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) .. ' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) .. @@ -1760,8 +1778,6 @@ function AdjustTcPos( bLen3) sPos = '0' .. sPos end end - -- salvo posizione - EMT.PREVTCPOS = sPos return sPos end diff --git a/Common_FAST.mlpe b/Common_FAST.mlpe index 019e57c..e846271 100644 --- a/Common_FAST.mlpe +++ b/Common_FAST.mlpe @@ -560,9 +560,8 @@ function OnSimulToolSelect( dPosA) end -- imposto il valore di A EgtSetAxisPos( 'A', dPosA) - if abs( dPosA) < 0.1 then - EgtSetAxisPos( 'C', EgtIf( BD.RIGHT_LOAD, 180, 0)) - end + local dHomeC = GetChainSawCHomeFromVirtualAxis( dPosA) + EgtSetAxisPos( 'C', dHomeC) EgtSetAxisPos( 'B', 0) -- se aggregato per fresa tipo blockhaus elseif EMT.HEAD == 'H7' then @@ -607,12 +606,7 @@ function OnSimulToolDeselect() SimulMoveAxis( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID) -- raddrizzo asse B prima di ruotare il C SimulMoveAxis( 'B', 0, MCH_SIM_STEP.COLLROT) - local dPosA = EgtGetAxisPos( 'A') - if abs( dPosA) < 0.1 then - SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, -180, 0), MCH_SIM_STEP.COLLROT) - else - SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, 270), MCH_SIM_STEP.COLLROT) - end + SimulMoveAxis( 'C', 0, MCH_SIM_STEP.COLLROT) SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID) -- movimento scarico rinvio elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then @@ -655,12 +649,7 @@ function OnSimulToolDeselect() SimulMoveAxes( 'B', EgtIf( GetTCSet( EMT.TCPOS) == 1, 90, -90), MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT) else if EMT.NEXTHEAD == 'H3' then - local dPosA = EgtGetAxisPos( 'A') - if abs( dPosA) < 0.1 then - SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, 270), MCH_SIM_STEP.RAPROT) - else - SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, -180, 0), MCH_SIM_STEP.COLLROT) - end + SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', 0, MCH_SIM_STEP.RAPROT) else SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT) end @@ -851,10 +840,15 @@ function OnSimulMoveStart() 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.HEAD == 'H3' or ( bZmax and EMT.TOTLEN > 200)) and + if EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then + SimulMoveAxis( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID) + SimulMoveAxis( 'B', 0, MCH_SIM_STEP.COLLROT) + SimulMoveAxis( 'C', EMT.R1, MCH_SIM_STEP.COLLROT) + SimulMoveAxis( 'B', EMT.R2, MCH_SIM_STEP.COLLROT) + elseif not EMT.LOAD and EMT.MOVE == 0 and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TOTLEN > 200)) and ( EMT.HT > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TOTLEN > 350) or bGoToHome) and EMT.FLAG2 == 1 then -- se motosega mi muovo a X di sicurezza per ruotare, prima si raddrizza B e poi C in posizione - if EMT.HEAD == 'H3' or bGoToHome then + if EMT.HEAD == 'H3' and bGoToHome then SimulMoveAxis( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID) SimulMoveAxis( 'B', 0, MCH_SIM_STEP.COLLROT) SimulMoveAxis( 'C', EMT.R1, MCH_SIM_STEP.COLLROT) diff --git a/UpdateLog.txt b/UpdateLog.txt index 8032595..cd4909a 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,8 @@ ==== Common_FAST Update Log ==== +Versione 3.1c2 (30/03/2026) +- (SIM-GEN) Corretti moviemnti con motosega. Ora si ruota la C con B sempre a zero, anche alla posizione X di sicurezza. Ticket#2866 + Versione 3.1c1 (27/03/2026) - (SIM-GEN) FASTCLAMPING = true : si suddivide il movimento metà tirando e metà spingendo con altra pinza. Così si aumenta la velocità. - FASTCLAMPING = false : una pinza resta ferma e si fa il movimento tutto con una pinza. Così si limita lo scivolamento del pezzo. diff --git a/Version.lua b/Version.lua index 9f2c6b3..4c5d488 100644 --- a/Version.lua +++ b/Version.lua @@ -3,7 +3,7 @@ local InfoCommon_STD_PP = { NAME = 'Common_FAST', -- nome script PP standard - VERSION = '3.1c1', -- versione script + VERSION = '3.1c2', -- versione script MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel }