From 66c94aece6e26a242796be25aad753256ac82c16 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Mon, 15 Apr 2024 09:01:46 +0200 Subject: [PATCH 1/5] Da testare: aggiunta gestione aggregato doppia uscita per controllo NUM_PLUS. --- Common-FAST.NUM_PLUS.mlpe | 27 ++++++++++++++++++++++++--- UpdateLog.txt | 3 +++ Version.lua | 2 +- 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/Common-FAST.NUM_PLUS.mlpe b/Common-FAST.NUM_PLUS.mlpe index 548bf83..42f694b 100644 --- a/Common-FAST.NUM_PLUS.mlpe +++ b/Common-FAST.NUM_PLUS.mlpe @@ -137,6 +137,14 @@ function OnToolData() if EMT.TDIST and abs( EMT.TDIST) < 0.1 then EMT.TDIST = nil end local sOut = 'L11='..EgtNumToString( EMT.SMAX, 0)..' L12='..EmtLenToString( ( EMT.TDIST or ChSawLen), 1)..' G76H9998.1N301N304' EmtOutput( sOut) + -- emissione dati rinvio + elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then + local nPos = EgtIf( EMT.HEAD == 'H5', 91, 93) + if EMT.EXIT == 2 then nPos = nPos + 1 end + local sPos = 'N3' .. tostring(nPos) + local sOut = 'L11=' .. EmtLenToString( EMT.SMAX, 3) .. ' L12=' .. EmtLenToString( AngTr1Offs, 1)..' G76H9998.1'..sPos..sPos + EmtOutput( sOut) + -- altro non previsto end end @@ -422,6 +430,10 @@ function OnMachiningStart() -- sistemazione speed if EMT.HEAD == 'H2' then EMT.S = EMT.S * 6 + elseif EMT.HEAD == 'H5' and EMT.EXIT == 1 then + EMT.S = -EMT.S + elseif EMT.HEAD == 'H6' and EMT.EXIT == 1 then + EMT.S = -EMT.S end -- determino subito se taglio di separazione di pezzo a caduta EMT.PREFALLCUT = nil @@ -1522,16 +1534,25 @@ function MyAdjustLinearAxes() if EMT.REFLOC then local vtE - if EMT.HEAD ~= 'H3' then + if EMT.HEAD == 'H1' or EMT.HEAD == 'H2' then local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs)) local LenRef = MillOffs vtE = Vector3d( EMT.EXTR) * Len - Z_AX() * LenRef - else + elseif EMT.HEAD == 'H3' then local LenAux = ( EMT.TDIST or ChSawLen) + MillOffs local LenRef = MillOffs local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3) vtE = vtAux * LenAux - Z_AX() * LenRef + elseif EMT.HEAD == 'H5' then + local Len = EMT.TLEN + AngTr1Len + local LenAux = MillOffs + AngTr1Offs + local LenRef = MillOffs + local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2) + vtE = Vector3d( EMT.EXTR) * Len + vtAux * LenAux - Z_AX() * LenRef + else + EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD) end + EMT.L1 = EMT.L1 - vtE:getX() EMT.L2 = EMT.L2 - DeltaTabY - vtE:getY() EMT.L3 = EMT.L3 - DeltaTabZ - vtE:getZ() @@ -1622,7 +1643,7 @@ end --------------------------------------------------------------------- function GetET( sHead, sTcPos, dAxR3) - if sHead == 'H1' then + if sHead == 'H1' or sHead == 'H5' or sHead == 'H6' then return ' E'..sTcPos elseif sHead == 'H2' then return ' ET42' diff --git a/UpdateLog.txt b/UpdateLog.txt index 6f6a921..fe1c5b6 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,8 @@ ==== Common_FAST Update Log ==== +Versione 2.6-- (--/--/2024) +- (GEN) Aggiunta gestione aggregato doppia uscita per controllo NUM_PLUS + Versione 2.6c8 (28/03/2024) - (MLSE) Possibilità di lavorazione da X- tra le pinze, se abilitata da flag (User.ENABLE_TOOL_BETWEEN_VICES == 1). - (MLDE-GEN) Aggiunto parametro 'IS_TEST_MACHINE' FACOLTATIVO. Se non esiste o 'false' è macchina standard, se 'true' è una macchina utilizzata per i test Egalware interni diff --git a/Version.lua b/Version.lua index 6ae10ca..c95a09c 100644 --- a/Version.lua +++ b/Version.lua @@ -3,7 +3,7 @@ local InfoCommon_STD_PP = { NAME = 'Common-FAST', -- nome script PP standard - VERSION = '2.6c8', -- versione script + VERSION = '2.6d1_beta', -- versione script MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel } From 09e2dd991df266290dffcdffc03ff41075621e89 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Mon, 15 Apr 2024 09:26:39 +0200 Subject: [PATCH 2/5] Per NUM_PLUS, in G114 per aggregato 2 uscite si scrive solo la sua lunghezza, senza pivot (come per TPA) --- Common-FAST.NUM_PLUS.mlpe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Common-FAST.NUM_PLUS.mlpe b/Common-FAST.NUM_PLUS.mlpe index 42f694b..03cdef6 100644 --- a/Common-FAST.NUM_PLUS.mlpe +++ b/Common-FAST.NUM_PLUS.mlpe @@ -163,7 +163,7 @@ function OnDispositionStart() ' EG'..EmtLenToString( SawOffs, 2)..' EI'..EmtLenToString( ParkY, 2)..' EL'..EmtLenToString( ParkV, 2).. ' EM'..EmtLenToString( TurnerOffs, 2)..' EN'..EmtLenToString( -DeltaTabY, 2)..' EO'..EmtLenToString( DeltaTabZ, 2) if SecondSupport >= 3 then - sOut = sOut ..' EP'..EmtLenToString( AngTr1Len, 2) ..' EQ'..EmtLenToString( AngTr1Offs + MillOffs,2) + sOut = sOut ..' EP'..EmtLenToString( AngTr1Len, 2) ..' EQ'..EmtLenToString( AngTr1Offs,2) end EmtOutput( '\n' .. sOut .. '\n') -- carico barra From e5ae54cc9834512198f2b6125f8aebf715a4e344 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Mon, 15 Apr 2024 11:28:48 +0200 Subject: [PATCH 3/5] - Corretto calcolo piano con aggregato da sotto - lista iniziale con N2xx --- Common-FAST.NUM_PLUS.mlpe | 4 ++-- Version.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Common-FAST.NUM_PLUS.mlpe b/Common-FAST.NUM_PLUS.mlpe index 03cdef6..61c47b9 100644 --- a/Common-FAST.NUM_PLUS.mlpe +++ b/Common-FAST.NUM_PLUS.mlpe @@ -141,7 +141,7 @@ function OnToolData() elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then local nPos = EgtIf( EMT.HEAD == 'H5', 91, 93) if EMT.EXIT == 2 then nPos = nPos + 1 end - local sPos = 'N3' .. tostring(nPos) + local sPos = 'N2' .. tostring(nPos) local sOut = 'L11=' .. EmtLenToString( EMT.SMAX, 3) .. ' L12=' .. EmtLenToString( AngTr1Offs, 1)..' G76H9998.1'..sPos..sPos EmtOutput( sOut) -- altro non previsto @@ -1592,7 +1592,7 @@ function CalcInterpPlane() local ptS = Point3d( xS, 0, 0) -- calcolo per piano generico local vtE - if EMT.HEAD ~= 'H3' then + if EMT.HEAD == 'H1' or EMT.HEAD == 'H2' then vtE = Vector3d( EMT.EXTR) else vtE = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3) diff --git a/Version.lua b/Version.lua index c95a09c..e47536c 100644 --- a/Version.lua +++ b/Version.lua @@ -3,7 +3,7 @@ local InfoCommon_STD_PP = { NAME = 'Common-FAST', -- nome script PP standard - VERSION = '2.6d1_beta', -- versione script + VERSION = '2.6d1_beta2', -- versione script MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel } From 3c1a1e540785de34e18eff2474cae516e9abccd3 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Mon, 15 Apr 2024 12:21:34 +0200 Subject: [PATCH 4/5] In MyAdjustLinearAxes corretta compensazione aggregato in X-Y --- Common-FAST.NUM_PLUS.mlpe | 7 +++---- Version.lua | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Common-FAST.NUM_PLUS.mlpe b/Common-FAST.NUM_PLUS.mlpe index 61c47b9..2286075 100644 --- a/Common-FAST.NUM_PLUS.mlpe +++ b/Common-FAST.NUM_PLUS.mlpe @@ -1544,11 +1544,10 @@ function MyAdjustLinearAxes() local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3) vtE = vtAux * LenAux - Z_AX() * LenRef elseif EMT.HEAD == 'H5' then - local Len = EMT.TLEN + AngTr1Len - local LenAux = MillOffs + AngTr1Offs + local LenAux = ( AngTr1Offs) + MillOffs local LenRef = MillOffs - local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2) - vtE = Vector3d( EMT.EXTR) * Len + vtAux * LenAux - Z_AX() * LenRef + local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3) + vtE = vtAux * LenAux - Z_AX() * LenRef else EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD) end diff --git a/Version.lua b/Version.lua index e47536c..cff7d85 100644 --- a/Version.lua +++ b/Version.lua @@ -3,7 +3,7 @@ local InfoCommon_STD_PP = { NAME = 'Common-FAST', -- nome script PP standard - VERSION = '2.6d1_beta2', -- versione script + VERSION = '2.6d1_beta3', -- versione script MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel } From 01105a8c6ac6ea366af28b4ffd137e44ac40d39f Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Mon, 15 Apr 2024 15:53:15 +0200 Subject: [PATCH 5/5] Allineamento con common ver. 2.6d1 --- Common-FAST.NUM.mlpe | 2 +- Common-FAST.NUM_PLUS.mlpe | 36 ++++++++++++++++++++++++++++++++---- Common-FAST.TPA.mlpe | 2 +- Essetre-FAST.mlde | 3 ++- UpdateLog.txt | 4 +++- Version.lua | 2 +- 6 files changed, 40 insertions(+), 9 deletions(-) diff --git a/Common-FAST.NUM.mlpe b/Common-FAST.NUM.mlpe index d07300d..ee7bef2 100644 --- a/Common-FAST.NUM.mlpe +++ b/Common-FAST.NUM.mlpe @@ -43,7 +43,7 @@ function OnProgramStart() EmtOutput( '%'..EgtNumToString( nPatt, 0)..'.0') -- aggiungo prefisso per commentae commenti iniziali se la macchina è utilizzata per fare i test - local sPrefixCommentLine = '' ; if IS_TEST_MACHINE then sPrefixCommentLine = '//' end + local sPrefixCommentLine = '' ; if IS_TEST_MACHINE or EgtEndsWith( EgtGetCurrMachineDir(), '.TEST') then sPrefixCommentLine = '//' end if EMT.INFO then EmtOutput( sPrefixCommentLine..'('..EMT.INFO..')') diff --git a/Common-FAST.NUM_PLUS.mlpe b/Common-FAST.NUM_PLUS.mlpe index 2286075..a686a10 100644 --- a/Common-FAST.NUM_PLUS.mlpe +++ b/Common-FAST.NUM_PLUS.mlpe @@ -43,7 +43,7 @@ function OnProgramStart() EmtOutput( '%'..EgtNumToString( nPatt, 0)..'.0') -- aggiungo prefisso per commentae commenti iniziali se la macchina è utilizzata per fare i test - local sPrefixCommentLine = '' ; if IS_TEST_MACHINE then sPrefixCommentLine = '//' end + local sPrefixCommentLine = '' ; if IS_TEST_MACHINE or EgtEndsWith( EgtGetCurrMachineDir(), '.TEST') then sPrefixCommentLine = '//' end if EMT.INFO then EmtOutput( sPrefixCommentLine..'('..EMT.INFO..')') @@ -684,8 +684,31 @@ function OnRapid() -- ricavo i dati per la lavorazione local sEE = ' EE' .. EgtIf( bZmax, '3', '4') - 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 sEL = ' EL' + -- se motosega + if EMT.HEAD == 'H3' then + sEL = sEL..EmtLenToString( ( EMT.TDIST or ChSawLen), 3) + -- se aggregato + elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then + sEL = sEL..EmtLenToString( AngTr1Offs, 3) + -- se testa normale ( H1 or H2) + else + sEL = sEL..EmtLenToString( EMT.TLEN, 3) + end + + local sER = ' ER' + -- se motosega + if EMT.HEAD == 'H3' then + sER = sER..EmtLenToString( EMT.TLEN, 3) + -- se aggregato + elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then + sER = sER..EmtLenToString( EMT.TLEN + AngTr1Len, 3) + -- se testa normale ( H1 or H2) + else + sER = sER..EmtLenToString( EMT.TDIAM / 2, 3) + end + local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3) local sES = ' ES'..EgtNumToString( EMT.S, 0) @@ -955,6 +978,11 @@ end --------------------------------------------------------------------- function OnArc() + -- con aggregato non si possono fare archi. Deve essere tutto spezzato + if EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then + EmtSetLastError( 1211, "With aggregate, the arcs must be splitted") + end + MyBackupAxes() EMT.TLAST = EMT.L1 -- non modale su archi @@ -1544,7 +1572,7 @@ function MyAdjustLinearAxes() local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3) vtE = vtAux * LenAux - Z_AX() * LenRef elseif EMT.HEAD == 'H5' then - local LenAux = ( AngTr1Offs) + MillOffs + local LenAux = AngTr1Offs + MillOffs local LenRef = MillOffs local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3) vtE = vtAux * LenAux - Z_AX() * LenRef diff --git a/Common-FAST.TPA.mlpe b/Common-FAST.TPA.mlpe index 0e5bfd9..90acbde 100644 --- a/Common-FAST.TPA.mlpe +++ b/Common-FAST.TPA.mlpe @@ -40,7 +40,7 @@ end function OnProgramStart() -- aggiungo prefisso per commentae commenti iniziali se la macchina è utilizzata per fare i test - local sPrefixCommentLine = '' ; if IS_TEST_MACHINE then sPrefixCommentLine = '//' end + local sPrefixCommentLine = '' ; if IS_TEST_MACHINE or EgtEndsWith( EgtGetCurrMachineDir(), '.TEST') then sPrefixCommentLine = '//' end -- Intestazioni if EMT.INFO then diff --git a/Essetre-FAST.mlde b/Essetre-FAST.mlde index 096c0eb..d7892fd 100644 --- a/Essetre-FAST.mlde +++ b/Essetre-FAST.mlde @@ -47,11 +47,12 @@ -- 2024/03/12 AV ver 2.6c8 Allineamento con common ver. 2.6c7. -- 2024/03/28 DS ver 2.6c9 Modificata posizione supporto rinvio. -- 2024/03/28 AV ver 2.6d1 Allineamento con common ver. 2.6c8 +-- 2024/04/15 AV ver 2.6d2 Allineamento con common ver. 2.6d1 require( 'EmtGenerator') EgtEnableDebug( false) -PP_VER = '2.6d1' +PP_VER = '2.6d2' MIN_MACH_VER = '2.5k1' MACH_NAME = 'Essetre-FAST' diff --git a/UpdateLog.txt b/UpdateLog.txt index fe1c5b6..593ef16 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,7 +1,9 @@ ==== Common_FAST Update Log ==== -Versione 2.6-- (--/--/2024) +Versione 2.6d1 (15/04/2024) - (GEN) Aggiunta gestione aggregato doppia uscita per controllo NUM_PLUS +- (GEN) Con aggregato con si possono fare archi, se OnArc con aggregato, dà errore. +- (GEN) Chiamando la macchina con un nome che termini con '.TEST' si abilita come macchina per test interni, equivalente a settare 'IS_TEST_MACHINE' (che comunque rimane) Versione 2.6c8 (28/03/2024) - (MLSE) Possibilità di lavorazione da X- tra le pinze, se abilitata da flag (User.ENABLE_TOOL_BETWEEN_VICES == 1). diff --git a/Version.lua b/Version.lua index cff7d85..a5bd2e6 100644 --- a/Version.lua +++ b/Version.lua @@ -3,7 +3,7 @@ local InfoCommon_STD_PP = { NAME = 'Common-FAST', -- nome script PP standard - VERSION = '2.6d1_beta3', -- versione script + VERSION = '2.6d1', -- versione script MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel }