From 660209bdea77bba9bf616783fd5f4cc59052d3e5 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Fri, 27 Mar 2026 15:14:21 +0100 Subject: [PATCH] - In caso di motosega prelevata, si ruota in home. - Cambio versione per rilascio a cliente --- Common_FAST.NUM.mlpe | 22 ++++++++-------------- Common_FAST.NUM_PLUS.mlpe | 22 ++++++++-------------- Common_FAST.TPA.mlpe | 22 ++++++++-------------- UpdateLog.txt | 6 ++---- Version.lua | 2 +- 5 files changed, 27 insertions(+), 47 deletions(-) diff --git a/Common_FAST.NUM.mlpe b/Common_FAST.NUM.mlpe index 2f7f754..d060715 100644 --- a/Common_FAST.NUM.mlpe +++ b/Common_FAST.NUM.mlpe @@ -662,28 +662,22 @@ function OnRapid() EmtOutput( '( *** ' .. sOut .. ' *** )') end - local bSplitMove = false - bSplitMove = bSplitMove or EMT.HEAD == 'H3' - bSplitMove = bSplitMove or ( not EMT.LOAD and ( bZmax and EMT.TTOTLEN > 200)) - bSplitMove = bSplitMove or ( not EMT.LOAD and ( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome)) -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione - if bSplitMove and EMT.FLAG2 == 1 then + 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 sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4') local sOutPreMove - if EMT.HEAD == 'H3' or bGoToHome then - if EMT.PREVHEAD == 'H3' then - sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. + 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 - else - local dPosA = GetCurrChainSawingVirtualAxis() - local MyParkCSawC = GetChainSawCHomeFromVirtualAxis( dPosA) - sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. - ' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( MyParkCSawC, 3) .. sEE .. sEL .. sER .. sET .. sES - end 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 + 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 diff --git a/Common_FAST.NUM_PLUS.mlpe b/Common_FAST.NUM_PLUS.mlpe index 2f2bf56..ee07262 100644 --- a/Common_FAST.NUM_PLUS.mlpe +++ b/Common_FAST.NUM_PLUS.mlpe @@ -734,28 +734,22 @@ function OnRapid() EmtOutput( '( *** ' .. sOut .. ' *** )') end - local bSplitMove = false - bSplitMove = bSplitMove or EMT.HEAD == 'H3' - bSplitMove = bSplitMove or ( not EMT.LOAD and ( bZmax and EMT.TTOTLEN > 200)) - bSplitMove = bSplitMove or ( not EMT.LOAD and ( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome)) -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione - if bSplitMove and EMT.FLAG2 == 1 then + 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 sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4') local sOutPreMove - if EMT.HEAD == 'H3' or bGoToHome then - if EMT.PREVHEAD == 'H3' then - sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. + 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 - else - local dPosA = GetCurrChainSawingVirtualAxis() - local MyParkCSawC = GetChainSawCHomeFromVirtualAxis( dPosA) - sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. - ' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( MyParkCSawC, 3) .. sEE .. sEL .. sER .. sET .. sES - end 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 + 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 diff --git a/Common_FAST.TPA.mlpe b/Common_FAST.TPA.mlpe index de0dbdb..2d59882 100644 --- a/Common_FAST.TPA.mlpe +++ b/Common_FAST.TPA.mlpe @@ -689,28 +689,22 @@ function OnRapid() EmtOutput( '( * ' .. sOut .. ' * )') end - local bSplitMove = false - bSplitMove = bSplitMove or EMT.HEAD == 'H3' - bSplitMove = bSplitMove or ( not EMT.LOAD and ( bZmax and EMT.TTOTLEN > 200)) - bSplitMove = bSplitMove or ( not EMT.LOAD and ( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome)) -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione - if bSplitMove and EMT.FLAG2 == 1 then + 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' or bGoToHome then - if EMT.PREVHEAD == 'H3' then - sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) .. + 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') - else - local dPosA = GetCurrChainSawingVirtualAxis() - local MyParkCSawC = GetChainSawCHomeFromVirtualAxis( dPosA) - sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) .. - ' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( MyParkCSawC, EMT.DECMACRO) .. + EmtOutput( sOutPreMove) + 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') - end EmtOutput( sOutPreMove) + elseif EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' 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) .. diff --git a/UpdateLog.txt b/UpdateLog.txt index 2440fea..8032595 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,11 +1,9 @@ ==== Common_FAST Update Log ==== -Versione 3.1-- (--/--/2026) +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. -- (GEN) Allineata generazione a simulazione. Se con motosega girava asse rotante B rischiava collisione perchè li muoveva contemporaneamente X,B,C. Ticket#2866 -- (GEN) In generazione diversificato caso di cambio utensile da H1 a H3 (motosega) e caso di home con utensile H3 sia in lavorazione precedente che corrente. Ticket#2866 -- (SIM-GEN) Motosega - Separata e completata funzione di calcolo parcheggio asse A/C in mlde e mlpe +- (GEN) In caso di motosega prelevata, si ruota in home. Ticket#2866 Versione 3.1a2 (26/01/2026) - (GEN) Nella G101 il parametro EE era sempre a 4 perchè la variabile veniva settata dopo. Ticket#2796 diff --git a/Version.lua b/Version.lua index 97828fb..9f2c6b3 100644 --- a/Version.lua +++ b/Version.lua @@ -3,7 +3,7 @@ local InfoCommon_STD_PP = { NAME = 'Common_FAST', -- nome script PP standard - VERSION = '3.1--', -- versione script + VERSION = '3.1c1', -- versione script MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel }