From c2ee793b465d3f60e435064cc10c1f47a5d47da3 Mon Sep 17 00:00:00 2001 From: "andrea.villa" Date: Wed, 7 Aug 2024 09:51:58 +0200 Subject: [PATCH] - Allineamento con common ver. 2.6h1 - Eliminati vecchi file - Aggiornato MLDE con chiamata ai file corretti - Modificato YML per compilazione --- .gitlab-ci.yml | 2 +- Beam/NestingData.ini | 3 ++ ...-PF1250.TPA.mlpe => Common_PF1250.TPA.mlpe | 48 +++++++++++++++++++ Common-PF1250.mlpe => Common_PF1250.mlpe | 2 +- Common-PF1250.mlse => Common_PF1250.mlse | 38 ++++++++------- Compile.bat | 6 +-- Essetre-PF1250rl.mlde | 7 +-- UpdateLog.txt | 5 ++ Version.lua | 2 +- Wall/NestingData.ini | 3 ++ 10 files changed, 90 insertions(+), 26 deletions(-) create mode 100644 Beam/NestingData.ini rename Common-PF1250.TPA.mlpe => Common_PF1250.TPA.mlpe (98%) rename Common-PF1250.mlpe => Common_PF1250.mlpe (99%) rename Common-PF1250.mlse => Common_PF1250.mlse (98%) create mode 100644 Wall/NestingData.ini diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 52327e3..d3c4a56 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -86,7 +86,7 @@ variables: echo "-----------------------" echo " Compilazione file *.lua 32/64bit" echo "-----------------------" - $FileList = Get-ChildItem("Common-*") + $FileList = Get-ChildItem("Common_*") ForEach ($File in $FileList) { $FileName = Split-Path $File -leaf lua54 -o $env:SRC_PATH\bin\$env:MACH_NAME\$FileName -s $FileName diff --git a/Beam/NestingData.ini b/Beam/NestingData.ini new file mode 100644 index 0000000..7b69376 --- /dev/null +++ b/Beam/NestingData.ini @@ -0,0 +1,3 @@ +[BEAM] +StartOffset=0 +Offset=0 diff --git a/Common-PF1250.TPA.mlpe b/Common_PF1250.TPA.mlpe similarity index 98% rename from Common-PF1250.TPA.mlpe rename to Common_PF1250.TPA.mlpe index 95247d4..e7b922e 100644 --- a/Common-PF1250.TPA.mlpe +++ b/Common_PF1250.TPA.mlpe @@ -1432,6 +1432,54 @@ end --------------------------------------------------------------------- function OnArc() + -- se necessario, impostazione riferimento locale + if EMT.REFLOC == 0 then + -- calcolo per piano generico + CalcInterpPlane() + EMT.REFLOC = 1 + -- salvo posizione attuale + local OldL1 = EMT.L1 + local OldL2 = EMT.L2 + local OldL3 = EMT.L3 + -- imposto posizione precedente (se presente devo annullare l'offset in X per sovramateriale di testa) + EMT.L1 = EMT.L1o + EMT.L2 = EMT.L2o + EMT.L3 = EMT.L3o + if EMT.X_OFF then EMT.L1 = EMT.L1 - EMT.X_OFF end + -- trasformo i punti nel piano + MyAdjustLinearAxes() + EmtAdjustRotaryAxes() + EMT.L1p = nil + EMT.L2p = nil + EMT.L3p = nil + MyOutput( 'M105 P1=' .. GetFaceCode() .. ' P2='..GetHeadSetCode()..' P3='..EgtIf( EMT.DOU_TYPE, 2, 0)) + MyOutput( 'M98') + MyOutput( 'M6 ' .. GetHeadToolCode() .. AdjustTcPos( true)) + MyOutput( 'G24' .. EMT.IPLGLSTR) + -- emissione movimento + EMT.R1p = nil + EMT.R2p = nil + if EmitRapidInG1 then + local sFeed = ' F30000' + sOut = 'G1'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3').. + EmtGetAxis('R2')..EmtGetAxis('R1')..sFeed + else + sOut = 'G0'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3').. + EmtGetAxis('R2')..EmtGetAxis('R1') + end + + MyOutput( sOut) + -- aggiorno precedenti + local nOriginalMove = EMT.MOVE + EMT.MOVE = 0 + EmtUpdatePrev() + EMT.MOVE = nOriginalMove + -- ripristino posizione attuale + EMT.L1 = OldL1 + EMT.L2 = OldL2 + EMT.L3 = OldL3 + end + -- se primo movimento in feed della lavorazione, dichiaro inizio lavorazione if EMT.MCHFIRSTFEED then EMT.MCHFIRSTFEED = nil diff --git a/Common-PF1250.mlpe b/Common_PF1250.mlpe similarity index 99% rename from Common-PF1250.mlpe rename to Common_PF1250.mlpe index 3c2a71f..04889ce 100644 --- a/Common-PF1250.mlpe +++ b/Common_PF1250.mlpe @@ -16,7 +16,7 @@ local sBaseDir = EgtGetCurrMachineDir() if NumericalControl == 'NUM' then error( 'Numerical Control error : NUM not yet managed') elseif NumericalControl == 'TPA' then - dofile( sBaseDir .. '\\Common-PF1250.TPA.mlpe') + dofile( sBaseDir .. '\\Common_PF1250.TPA.mlpe') else error( 'Numerical Control error : unkwnown type') end diff --git a/Common-PF1250.mlse b/Common_PF1250.mlse similarity index 98% rename from Common-PF1250.mlse rename to Common_PF1250.mlse index 28f7204..792b8eb 100644 --- a/Common-PF1250.mlse +++ b/Common_PF1250.mlse @@ -659,6 +659,14 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload) -- Verifico se lavorazione pareti local bWall = ( EgtGetInfo( EgtGetCurrMachGroup() or GDB_ID.NULL, 'Wall', 'd') == 1) + -- mi salvo info lavorazione su una lista + local AuxInfoMach = {} + AuxInfoMach.bPreSplit = bPreSplit + AuxInfoMach.bSplitting = bSplitting + AuxInfoMach.bPreCut = bPreCut + AuxInfoMach.bCutting = bCutting + AuxInfoMach.bUnload = bUnload + -- Assegno flag di pezzo separato dal resto del grezzo SPLIT = IsEndPhase( EMC.PHASE) @@ -745,7 +753,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload) local dPosT = LoadT local vCmd = SpecCalcLoad( dPosT, dDistFront, max( dDistBack, MinJoin, EMC.LB - ( MaxY1 - MinY1) + 6)) EMC.LOAD = true - local vCmd2 = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar) + local vCmd2 = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar, AuxInfoMach) EMC.LOAD = nil if bSplitting and EMC.ERR == 18 then table.insert( vCmd, { 22, dRollBack, -dRollFront}) @@ -758,7 +766,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload) -- Se altrimenti non eseguito SPLIT, eseguo calcoli per carrelli elseif not SPLIT then - local vCmd = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar) + local vCmd = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar, AuxInfoMach) -- Se non ci sono spostamenti, confermo i parametri di aggancio e di posizione roller if SpecTestOnlyRemarkInCmds( vCmd) then table.insert( vCmd, { 21, EgtIf( EMC.Y1DELTA, EMC.Y1DELTA, 0), EgtIf( EMC.Y2DELTA, EMC.Y2DELTA, 0)}) @@ -1043,7 +1051,7 @@ function SpecCalcLoad( dPosT, dDistFront, dDistBack) end -- SpecAdjustLoad [L] --------------------------------------------------------------------- -function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar) +function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar, AuxInfoMach) local MinFrontJoin = MinJoin + EMC.HCING + EMC.HOVM local MyMinOther = MinOther + EgtIf( EMC.CNT == 1, AggLoad, 0) @@ -1083,13 +1091,11 @@ function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1Del WorkTab.dV2PosF = -dRollFront WorkTab.bV2CloseF = false - -- aggiuntivo per non avere problemi con pezzi a caduta - if WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 5 * BD.CHAR_EXTRA_DIST then - WorkTab.dY1DeltaMinF = WorkTab.dY1DeltaMinF + 4 * BD.CHAR_EXTRA_DIST - elseif WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 2.5 * BD.CHAR_EXTRA_DIST then - WorkTab.dY1DeltaMinF = WorkTab.dY1DeltaMinF + 2 * BD.CHAR_EXTRA_DIST - elseif WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 1.5 * BD.CHAR_EXTRA_DIST then - WorkTab.dY1DeltaMinF = WorkTab.dY1DeltaMinF + BD.CHAR_EXTRA_DIST + -- dopo che si è calcolato il minimo e massimo dell'intervallo, verifico che in testa rimanga almeno il minimo per poter fare passaggio pinze e scaricare + if AuxInfoMach and ( AuxInfoMach.bSplitting or AuxInfoMach.bCutting) then + if WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 1.5 * BD.CHAR_EXTRA_DIST and WorkTab.dY1DeltaMaxF > EMC.LT + BD.MINRAW_S + BD.CHAR_EXTRA_DIST then + WorkTab.dY1DeltaMinF = max( min( EMC.LT + BD.MINRAW_S, WorkTab.dY1DeltaMaxF - 1), WorkTab.dY1DeltaMinF) + end end -- verifico validità intervallo ammesso per Y1 @@ -1128,13 +1134,11 @@ function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1Del WorkTab.dV2PosF = -dRollFront WorkTab.bV2CloseF = false - -- aggiuntivo per minimizzare scambi carrelli - if WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 5 * BD.CHAR_EXTRA_DIST then - WorkTab.dY1DeltaMinF = WorkTab.dY1DeltaMinF + 4 * BD.CHAR_EXTRA_DIST - elseif WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 2.5 * BD.CHAR_EXTRA_DIST then - WorkTab.dY1DeltaMinF = WorkTab.dY1DeltaMinF + 2 * BD.CHAR_EXTRA_DIST - elseif WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 1.5 * BD.CHAR_EXTRA_DIST then - WorkTab.dY1DeltaMinF = WorkTab.dY1DeltaMinF + BD.CHAR_EXTRA_DIST + -- dopo che si è calcolato il minimo e massimo dell'intervallo, verifico che in testa rimanga almeno il minimo per poter fare passaggio pinze e scaricare + if AuxInfoMach and ( AuxInfoMach.bSplitting or AuxInfoMach.bCutting) then + if WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 1.5 * BD.CHAR_EXTRA_DIST and WorkTab.dY1DeltaMaxF > EMC.LT + BD.MINRAW_S + BD.CHAR_EXTRA_DIST then + WorkTab.dY1DeltaMinF = max( min( EMC.LT + BD.MINRAW_S, WorkTab.dY1DeltaMaxF - 1), WorkTab.dY1DeltaMinF) + end end -- verifico validità intervallo ammesso per Y1 diff --git a/Compile.bat b/Compile.bat index c5f608d..1eb4a21 100644 --- a/Compile.bat +++ b/Compile.bat @@ -25,9 +25,9 @@ REM copio i sorgenti nel percorso temporaneo per i compilati ROBOCOPY . %fullPathSource%\bin\%machineName%\ /E /XF "Compile.bat" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" REM copio i file compilati nel percorso temporaneo per i compilati -\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-PF1250.mlpe Common-PF1250.mlpe -\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-PF1250.mlse Common-PF1250.mlse -\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-PF1250.TPA.mlpe Common-PF1250.TPA.mlpe +\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common_PF1250.mlpe Common_PF1250.mlpe +\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common_PF1250.mlse Common_PF1250.mlse +\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common_PF1250.TPA.mlpe Common_PF1250.TPA.mlpe REM comprimo i file compilati in uno zip pronto per essere distribuito tar.exe acvf %fullPathZip%\%machineName%.zip -C %fullPathSource%\bin\ %machineName%\*.* diff --git a/Essetre-PF1250rl.mlde b/Essetre-PF1250rl.mlde index ee610bc..1fe8e67 100644 --- a/Essetre-PF1250rl.mlde +++ b/Essetre-PF1250rl.mlde @@ -57,12 +57,13 @@ -- Aggiunti file per note utensile e lavorazione -- 2024/07/24 ver 2.6g5 Allineamento con common ver. 2.6g5 -- Gestione limite corsa asse B2 se lama su H21 +-- 2024/08/07 ver 2.6h1 Allineamento con common ver. 2.6h1 -- Intestazioni require( 'EmtGenerator') EgtEnableDebug( false) -PP_VER = '2.6g5' +PP_VER = '2.6h1' MIN_MACH_VER = '2.5k1' MACH_NAME = 'Essetre-PF1250rl' @@ -303,8 +304,8 @@ EmtGeneral { ExitMaxAdjust = 300, ExitMaxRotAdj = 0.5, AngDeltaMinForHome = 80, - Special = 'Common-PF1250.mlse', - Processor = 'Common-PF1250.mlpe'} + Special = 'Common_PF1250.mlse', + Processor = 'Common_PF1250.mlpe'} -- in base alla corsa macchina, si carica la rulliera di carico/scarico appropriata local sGeomConvoyer = EgtIf( MaxY1 > 6500, '_8M', '_5M') local sBaseAux = {'BASE/SOLID', 'BASE/CONVOYER'..sGeomConvoyer, 'BASE/COLLISION', 'BASE/TC1', 'BASE/TCR', 'BASE/TC3'} diff --git a/UpdateLog.txt b/UpdateLog.txt index 73a019e..4b89eae 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,10 @@ ==== Common_PF1250 Update Log ==== +Versione 2.6h1 (07/08/2024) +- (GEN) Gestione creazione piano generico in caso il primo movimento della lavorazione sia un arco. Ticket#1891 +- (SIM-GEN) Migliorata gestione riposizionamenti fatta con la 2.6g1. Ticket#1836 +- (MLDE-SIM-GEN) Rinominato file da "Common-" a "Common_" per uniformità con i file common delle altre macchine. Serve modifica a MLDE macchina. + Versione 2.6g5 (24/07/2024) - (SIM) Per OnSetHead chiamata da simulazione, aggiunta lettura TOTDIAM. Serve per limitare corse assi testa sotto. Ticket#1946 diff --git a/Version.lua b/Version.lua index 1348422..aa1b8f2 100644 --- a/Version.lua +++ b/Version.lua @@ -3,7 +3,7 @@ local InfoCommon_STD_PP = { NAME = 'Common_PF1250', -- nome script PP standard - VERSION = '2.6g5', -- versione script + VERSION = '2.6h1', -- versione script MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel } diff --git a/Wall/NestingData.ini b/Wall/NestingData.ini new file mode 100644 index 0000000..3ef74c1 --- /dev/null +++ b/Wall/NestingData.ini @@ -0,0 +1,3 @@ +[WALL] +Kerf=10 +Offset=25