From b50c4ef806cd3729d1575445bec1e82b6b11c5d5 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Tue, 24 Sep 2024 16:03:40 +0200 Subject: [PATCH] - Tolto controllo su lunghezza maggiore di 200mm introdotto con 2.6i2 - Gestione in OnRapid() di EMT.FLAG=5 --- Common_FAST.NUM.mlpe | 18 ++++++++++++++---- Common_FAST.NUM_PLUS.mlpe | 18 ++++++++++++++---- Common_FAST.TPA.mlpe | 14 ++++++++++---- Common_FAST.mlpe | 2 +- UpdateLog.txt | 4 ++++ Version.lua | 2 +- 6 files changed, 44 insertions(+), 14 deletions(-) diff --git a/Common_FAST.NUM.mlpe b/Common_FAST.NUM.mlpe index 02e1f11..9980e76 100644 --- a/Common_FAST.NUM.mlpe +++ b/Common_FAST.NUM.mlpe @@ -627,7 +627,7 @@ function OnRapid() local MyZHome = EgtGetAxisHomePos( 'Z') local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1) -- se avevo motosega, torno in zona sicura senza ruotare assi rotanti - if ( EMT.PREVHEAD == 'H3' or EMT.TTOTLEN > 200) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then + if EMT.PREVHEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then 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 @@ -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' or EMT.TTOTLEN > 200) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then + if EMT.HEAD == 'H3' 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 @@ -836,9 +836,19 @@ function OnRapid() -- se altrimenti movimento in Home elseif EMT.FLAG == 4 then -- non previsto - -- se altrimenti rotazione a Z max + -- se altrimenti rotazione a Z max per lavorazione successiva elseif EMT.FLAG == 5 then - -- viene gestito all'inizio della lavorazione successiva + -- ricavo i dati per la lavorazione + local sEE = ' EE3' + local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3) + local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3) + local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3) + local sES = ' ES'..EgtNumToString( EMT.S, 0) + local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') .. + EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES + EmtOutput( sOut) + EmtOutput( 'G101 ET1001') + EmtOutput( 'G101 ET2001') -- altrimenti errore else EmtSetLastError( 1212, "Unknown Rapid flag") diff --git a/Common_FAST.NUM_PLUS.mlpe b/Common_FAST.NUM_PLUS.mlpe index 23be211..bfff4fc 100644 --- a/Common_FAST.NUM_PLUS.mlpe +++ b/Common_FAST.NUM_PLUS.mlpe @@ -668,7 +668,7 @@ function OnRapid() local MyZHome = EgtGetAxisHomePos( 'Z') local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1) -- se avevo motosega, torno in zona sicura senza ruotare assi rotanti - if ( EMT.PREVHEAD == 'H3' or EMT.TTOTLEN > 200) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then + if EMT.PREVHEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then 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 @@ -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' or EMT.TTOTLEN > 200) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then + if EMT.HEAD == 'H3' 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 @@ -910,9 +910,19 @@ function OnRapid() -- se altrimenti movimento in Home elseif EMT.FLAG == 4 then -- non previsto - -- se altrimenti rotazione a Z max + -- se altrimenti rotazione a Z max per lavorazione successiva elseif EMT.FLAG == 5 then - -- viene gestito all'inizio della lavorazione successiva + -- ricavo i dati per la lavorazione + local sEE = ' EE3' + local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3) + local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3) + local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3) + local sES = ' ES'..EgtNumToString( EMT.S, 0) + local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') .. + EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES + EmtOutput( sOut) + EmtOutput( 'G101 ET1001') + EmtOutput( 'G101 ET2001') -- altrimenti errore else EmtSetLastError( 1212, "Unknown Rapid flag") diff --git a/Common_FAST.TPA.mlpe b/Common_FAST.TPA.mlpe index c3acb1d..13afb08 100644 --- a/Common_FAST.TPA.mlpe +++ b/Common_FAST.TPA.mlpe @@ -647,7 +647,7 @@ function OnRapid() local MyZHome = EgtGetAxisHomePos( 'Z') local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1) -- se avevo motosega, torno in zona sicura senza ruotare assi rotanti - if ( EMT.PREVHEAD == 'H3' or EMT.TTOTLEN > 200) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then + if EMT.PREVHEAD == 'H3' 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.R2pp, 3) .. ' P5=' .. EgtNumToString( EMT.R1pp, 3) .. ' P6=' .. EgtNumToString( EMT.PREVTCPOS, 3) .. ' P7=' .. EgtNumToString( EMT.PREVS, 0) .. @@ -663,7 +663,7 @@ function OnRapid() end -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione - if ( EMT.HEAD == 'H3' or EMT.TTOTLEN > 200) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then + if EMT.HEAD == 'H3' 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) .. @@ -852,9 +852,15 @@ function OnRapid() -- se altrimenti movimento in Home elseif EMT.FLAG == 4 then -- non previsto - -- se altrimenti rotazione a Z max + -- se altrimenti rotazione a Z max per lavorazione successiva elseif EMT.FLAG == 5 then - -- viene gestito all'inizio della lavorazione successiva + 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) .. + ' P8=0' .. ' P9=0' .. ' P10=3' + EmtOutput( sOut) + EmtOutput( 'M101 P1=2') + EmtOutput( 'M101 P1=3') -- altrimenti errore else error( "Unknown Rapid flag") diff --git a/Common_FAST.mlpe b/Common_FAST.mlpe index 2594db7..9f9d720 100644 --- a/Common_FAST.mlpe +++ b/Common_FAST.mlpe @@ -752,7 +752,7 @@ function OnSimulMoveStart() -- 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' or EMT.TOTLEN > 200 then + if EMT.HEAD == 'H3' 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 b44ed72..7539012 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,9 @@ ==== Common_FAST Update Log ==== +Versione 2.6-- (--/--/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 + Versione 2.6i4 (24/09/2024) - (SIM-GEN) Aggiunto ripinzaggio extra in caso servisse un grande spostamento e si sta pinzando poco. L'aggiunta del ripinzaggio dipende da FASTCLAMPING (che deve essere disattiva). Viene aggiunta GAIN_RECLAMPING per decidere il guadagno in mm del ripinzaggio. diff --git a/Version.lua b/Version.lua index a600b8d..8286281 100644 --- a/Version.lua +++ b/Version.lua @@ -3,7 +3,7 @@ local InfoCommon_STD_PP = { NAME = 'Common_FAST', -- nome script PP standard - VERSION = '2.6i4', -- versione script + VERSION = '2.6--', -- versione script MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel }