From 14b225a4b0f916465915353558f8df560ea16a03 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Tue, 17 Mar 2026 15:22:40 +0100 Subject: [PATCH] Allineamento a common ver. 3.1c2 --- Common_ONE-PF.NUM.mlpe | 2 +- Common_ONE-PF.mlpe | 2 +- Common_ONE-PF.mlse | 20 +++++++++++++++++++- Essetre-PFrl.mlde | 4 ++-- UpdateLog.txt | 10 ++++++++++ Version.lua | 4 ++-- 6 files changed, 35 insertions(+), 7 deletions(-) diff --git a/Common_ONE-PF.NUM.mlpe b/Common_ONE-PF.NUM.mlpe index 3d36bf4..9f915be 100644 --- a/Common_ONE-PF.NUM.mlpe +++ b/Common_ONE-PF.NUM.mlpe @@ -981,7 +981,7 @@ function OnRapid() local dTRad, dTLen = GetToolRadLen() -- se fresa o lama if not HeadIsChainSaw( EMT.HEAD) then - EmitMoveDataHead( 1, { X=-ParkX2, Z=MyMaxZ1, B=HomeB1, C=HomeC1, TRad=dTRad, TLen=dTLen, S=Speed}) + EmitMoveDataHead( 1, { X=-ParkFrnX1, Z=MyMaxZ1, B=HomeB1, C=HomeC1, TRad=dTRad, TLen=dTLen, S=Speed}) EmitMoveStartHead( 1) EmitMoveWaitHead( 1) EmitMoveWaitChars( EgtIf( bOnlyCharY, 1, 3)) diff --git a/Common_ONE-PF.mlpe b/Common_ONE-PF.mlpe index 1032cbe..38898ee 100644 --- a/Common_ONE-PF.mlpe +++ b/Common_ONE-PF.mlpe @@ -1112,7 +1112,7 @@ function OnSimulMoveStart() local bMoveZbeforeX = false local dZref = EMT.L3 - if EMT.HEAD == 'H12' and ( -EMT.L2 < -LimX1RotSaw or EMT.R2 > 91) then + if EMT.HEAD == 'H12' and ( EgtIf( BD.RIGHT_LOAD, -EMT.L2 < -LimX1RotSaw, -EMT.L2 > -LimX1RotSaw) or EMT.R2 > 91) then dZref = Z1Home + GetZExtra( EMT.HEAD, EMT.R2) - 100 end -- se la quota di lavoro è più in alta della posizione a ZHOME della testa, prima si va alla Z di lavoro e poi si approccia il pezzo diff --git a/Common_ONE-PF.mlse b/Common_ONE-PF.mlse index 7953cfc..aa6ecf9 100644 --- a/Common_ONE-PF.mlse +++ b/Common_ONE-PF.mlse @@ -713,6 +713,24 @@ end --------------------------------------------------------------------- function OnPostApplyMachining() + -- Inizializzo codice di errore + EMC.ERR = 0 + -- Verifico se ultima lavorazione della fase + local nNextOpeId = EgtGetNextActiveOperation( EMC.MCHID) + local bMchLast = ( not nNextOpeId or EgtGetOperationPhase( nNextOpeId) ~= EMC.PHASE) -- Agisco sui diversi percorsi della lavorazione + local nPathId = EgtGetFirstInGroup( EgtGetFirstNameInGroup( EMC.MCHID, 'CL') or GDB_ID.NULL) + while nPathId do + -- recupero id del successivo + nPathId = EgtGetNext( nPathId) + -- verifico se ultimo percorso di ultima lavorazione della fase + local bLast = ( bMchLast and ( not nPathId)) + -- se ultimo, elimino ritorno in home + if bLast then EgtRemoveOperationHome( EMC.MCHID) end + end +end + +--------------------------------------------------------------------- +function OnSpecialApplyMachining() EgtOutLog( ' Lavorazione : ' .. EgtGetName( EMC.MCHID), 1) @@ -820,7 +838,7 @@ function OnPostApplyMachining() -- verifico se ultimo percorso di ultima lavorazione della fase local bLast = ( bMchLast and ( not nPathId)) -- se ultimo, elimino ritorno in home - if bLast then EgtRemoveOperationHome( EMC.MCHID) end + -- if bLast then EgtRemoveOperationHome( EMC.MCHID) end -- salvo lo stato dei carrelli local OriTPos = EMC.TPOS local OriY1Delta = EMC.Y1DELTA diff --git a/Essetre-PFrl.mlde b/Essetre-PFrl.mlde index 5d36e6a..38ba7ba 100644 --- a/Essetre-PFrl.mlde +++ b/Essetre-PFrl.mlde @@ -44,8 +44,8 @@ require( 'EmtGenerator') EgtEnableDebug( false) -PP_VER = '3.1b1' -PP_NVER = '3.1.2.1' +PP_VER = '3.1c1' +PP_NVER = '3.1.3.1' MIN_MACH_VER = '2.5k1' MACH_NAME = EgtGetCurrMachineName() diff --git a/UpdateLog.txt b/UpdateLog.txt index 0d7aa54..f2f8e02 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,4 +1,14 @@ ==== Common_ONE-PF Update Log ==== + +Versione 3.1c2 (17/03/2026) +- (SIM-GEN) Aggiunta OnSpecialApplyMachining per calcolare i carrelli da subito +- Aggiungendo OnSpecialApplyMachining, ora la OnSpecialGetPrevMachiningOffset lavora correttamente. ATT: MIN_MACH -> 3.1b2 + + +Versione 3.1c1 (04/03/2026) +- (GEN) Corretta chiamata di una variabile insesistente in caso di ONE +- (SIM) Allineata simulazione a generazione + Versione 3.1b1 (20/02/2026) - (GEN) Aggiunta funzione ToolPreSelection() per la preselezione utensile. Ticket#2789 - (GEN) Funzione rinominata in ToolPreSelectionSingleHead(), ora utilizza funzione in MLDE per capire se è motosega diff --git a/Version.lua b/Version.lua index 7864b9a..c5849b2 100644 --- a/Version.lua +++ b/Version.lua @@ -3,8 +3,8 @@ local InfoCommon_STD_PP = { NAME = 'Common_ONE-PF', -- nome script PP standard - VERSION = '3.1b1', -- versione script - MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel + VERSION = '3.1c2', -- versione script + MIN_MACH_VER_PP_COMMON = '3.1b2' -- versione minima kernel } return InfoCommon_STD_PP