diff --git a/Common_ONE-PF.NUM.mlpe b/Common_ONE-PF.NUM.mlpe index 782da97..2fe489d 100644 --- a/Common_ONE-PF.NUM.mlpe +++ b/Common_ONE-PF.NUM.mlpe @@ -312,6 +312,8 @@ function OnDispositionEnd() MyOutputNoNum( '(PART UNLOAD)') for i = 1, #EMT.MDCHAR do EmitMoveDataChars( EMT.MDCHAR[i]) + if EMT.MDCHAR[i].V1 then EMT.V1POS = EMT.MDCHAR[i].V1 end + if EMT.MDCHAR[i].V2 then EMT.V2POS = EMT.MDCHAR[i].V2 end end EmitMoveStartChars( 2) -- se dopo c'è scarico spezzone devo mettere attesa termine esecuzione @@ -327,7 +329,8 @@ function OnDispositionEnd() end elseif EMT.SPECUNLOADING then EmtOutput( '(PART SPEC UNLOADING)') - EmitBeamHeadData( { T=EMT.L1, Pz5=2}) + local dAbsHeadPos = EMT.L1pp or EMT.L1 + EmitBeamHeadData( { T=dAbsHeadPos, Pz5=2}) EMT.SPECUNLOADING = nil EMT.W2DELTA = nil -- emissione conclusione pezzo precedente @@ -674,8 +677,8 @@ function OnPathStart() EMT.L1pp = EMT.L1op EMT.L2pp = EMT.L2op EMT.L3pp = EMT.L3op - EMT.R1pp = EMT.R1p - EMT.R2pp = EMT.R2p + EMT.R1pp = EMT.R1p or EMT.R1pp + EMT.R2pp = EMT.R2p or EMT.R2pp else EMT.L1pp = nil EMT.L2pp = nil @@ -1603,7 +1606,7 @@ function OnRapid() MyAdjustLinearAxes() EmtAdjustRotaryAxes() -- se Split o Presplit lascio agganciata solo la pinza Y2 alla fine dei movimenti - local sNextTool = GetNextTool( EMT.MCHID) + local sNextTool = GetNextTool( EMT.MCHID, true) -- vado in home se è ultimo movimento ed è ultima lavorazione, se sono con motosega e devo cambiare utensile, oppure se ho la lama local bToXhome = ( IsLastPath( EMT.PATHID) and not sNextTool) or ( EMT.HEAD == 'H23' and EMT.TOOL ~= sNextTool) or ( EMT.HEAD == 'H13' and EMT.TOOL ~= sNextTool) or ( EMT.HEAD == 'H12' and EMT.TOOL ~= sNextTool ) or ( EMT.HEAD == 'H22' and EMT.TOOL ~= sNextTool) or EMT.MCHSPLIT @@ -2415,6 +2418,9 @@ end --------------------------------------------------------------------- function GetV1ToCloseNum( UseCurrV1) + if EMT.MCHPRECUT or EMT.MCHCUT then + return false + end --EmtOutput( string.format( 'L1m=%.3f L1M=%.3f', EMT.MAXMIN[1], EMT.MAXMAX[1])) --EmtOutput( string.format( 'LB=%.3f LT=%.3f', EMT.LB, EMT.LT)) local dV1Pos @@ -2949,11 +2955,12 @@ end --------------------------------------------------------------------- function EmitResetMachining() - if ( EMT.TOOL ~= GetNextTool( EMT.MCHID) and IsLastPath( EMT.PATHID)) or GetSpecUnloading( EMT.PATHID) or GetFall( EMT.PATHID) then - -- se da MLDE parametro non settato, o settato a true, scrivo il comando arresto mandrino - if WriteM05Command == nil or WriteM05Command then - EmtOutput( 'M05') - end + -- se non sono a Z massima e operatore deve entrare in cabina spango sempre + if not EMT.ZMAX and ( GetSpecUnloading( EMT.PATHID) or GetFall( EMT.PATHID)) then + EmtOutput( 'M05') + -- altrimenti spegnimento dipende da parametro + elseif ( EMT.TOOL ~= GetNextTool( EMT.MCHID, false) and IsLastPath( EMT.PATHID)) or GetSpecUnloading( EMT.PATHID) or GetFall( EMT.PATHID) then + EmtOutput( 'M05') end local sOut = 'G157 EA1' EmtOutput( sOut) diff --git a/Common_ONE-PF.mlpe b/Common_ONE-PF.mlpe index 2a5224e..7f067dd 100644 --- a/Common_ONE-PF.mlpe +++ b/Common_ONE-PF.mlpe @@ -237,9 +237,9 @@ function OnSimulDispositionStart() end end -- determino la risoluzione dello Zmap - local dTol = 4.00 + local dTol = 4.71 if EmtGetVMillStep then - dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), 4.00) + dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), 4.71) else local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ() if dArea < 0.075e6 then @@ -772,6 +772,7 @@ function OnSimulMachiningStart() EMT.VMRS = ( EMT.MCHTYPE ~= MCH_MY.DRILLING and not EMT.MCHUSERNOTES:find( 'VMRS=0;', 1, true)) EMT.MCHSPLIT = ( EMT.MCHUSERNOTES:find( 'Split;', 1, true) ~= nil) EMT.MCHPRECUT = ( EMT.MCHUSERNOTES:find( 'Precut;', 1, true) ~= nil) + EMT.MCHCUT = ( EMT.MCHUSERNOTES:find( 'Cut;', 1, true) ~= nil) -- recupero TASKID della feature lavorata local vId = EgtGetMachiningGeometry() if vId and #vId > 0 and #vId[1] > 0 then @@ -965,7 +966,12 @@ function OnSimulMoveStart() -- pinza 5 if EMT.W2DELTA then EMT.A5n = 'W' - EMT.A5m = 'T' + local dPosQW = EgtGetAxisPos( 'QW') or 0 + if dPosQW < 1 then + EMT.A5m = nil + else + EMT.A5m = 'T' + end EMT.A5 = EMT.L1 + EMT.W2DELTA - EMT.A4 VerifyWStroke( EMT.A5) end @@ -1343,7 +1349,7 @@ function OnSimulMoveEnd() -- eventuale rimozione sfridi ExecRemoveScraps() -- se Split o Presplit lascio agganciata solo la pinza Y2 alla fine dei movimenti - local sNextTool = GetNextTool( EMT.MCHID) + local sNextTool = GetNextTool( EMT.MCHID, true) -- vado in home se è ultimo movimento ed è ultima lavorazione, se sono con motosega e devo cambiare utensile, oppure se ho la lama local bToXhome = ( IsLastPath( EMT.PATHID) and not sNextTool) or ( EMT.HEAD == 'H23' and EMT.TOOL ~= sNextTool) or ( EMT.HEAD == 'H13' and EMT.TOOL ~= sNextTool) or ( EMT.HEAD == 'H12' and EMT.TOOL ~= sNextTool ) or ( EMT.HEAD == 'H22' and EMT.TOOL ~= sNextTool) or EMT.MCHSPLIT @@ -1477,7 +1483,7 @@ function ExecAuxCmd( sCmd, bPathStart) ExecMoveHome( Cmd[2] == '1', EgtIf( bPathStart, false, EMT.MCHSPLIT)) elseif Cmd[1] == '11' then local bClose = Cmd[2] ~= '0' - if bPathStart and EMT.MCHSPLIT and not EMT.FALL and GetPY2Light() then bClose = false end + if bPathStart and EMT.MCHSPLIT and not ( EMT.FALL or EMT.TO_FALL) and GetPY2Light() then bClose = false end ExecMovePY1( bClose) elseif Cmd[1] == '12' then ExecMovePY2( Cmd[2] ~= '0') @@ -2206,6 +2212,9 @@ end --------------------------------------------------------------------- function GetV1ToClose() + if EMT.MCHPRECUT or EMT.MCHCUT then + return false + end --EgtOutLog( string.format( 'L1m=%.3f L1M=%.3f V2NP=%.3f LB=%.3f', EMT.MAXMIN[1], EMT.MAXMAX[1], EMT.V2NEXTPOS, EMT.LB)) --EgtOutLog( string.format( 'LB=%.3f LT=%.3f', EMT.LB, EMT.LT or 0)) return ( EMT.MAXMAX[1] <= EMT.V1NEXTPOS + RollCageMin and EMT.MAXMIN[1] + EMT.LB >= EMT.V1NEXTPOS + RollCageMax) @@ -2815,7 +2824,7 @@ function GetNextChainSawingVirtualAxis( MchId) end --------------------------------------------------------------------- -function GetNextTool( nMchId) +function GetNextTool( nMchId, bResetOnStart) -- inizializzo prossimo utensile local sNextTool -- recupero lavorazione successiva @@ -2823,7 +2832,7 @@ function GetNextTool( nMchId) while nNextMchId do -- se la prossima lavorazione è lo start di un altro pezzo, faccio finta che cambia utensile in modo che vada in parcheggio con utensili speciali if EgtGetOperationType( nNextMchId) == MCH_OY.DISP then - if IsStartOrRestPhase( EMT.PHASE+1) then + if IsStartOrRestPhase( EMT.PHASE+1) and bResetOnStart then return nil end else diff --git a/Essetre-PFrl.mlde b/Essetre-PFrl.mlde index 6f2d58b..16e2b90 100644 --- a/Essetre-PFrl.mlde +++ b/Essetre-PFrl.mlde @@ -44,8 +44,8 @@ require( 'EmtGenerator') EgtEnableDebug( false) -PP_VER = '2.7g5' -PP_NVER = '2.7.7.5' +PP_VER = '2.7h1' +PP_NVER = '2.7.8.1' MIN_MACH_VER = '2.5k1' MACH_NAME = 'Essetre-PFrl' diff --git a/UpdateLog.txt b/UpdateLog.txt index 9a17fa2..1ff2ce3 100644 --- a/UpdateLog.txt +++ b/UpdateLog.txt @@ -1,5 +1,11 @@ ==== Common_ONE-PF Update Log ==== +Versione 2.7h1 (20/08/2025) +- (SIM-GEN) Non si chiudono i rulli se tagli o pretagli di testa e coda +- (SIM) Corretto movimento pinza 5 in caso di riposizionamento pinza 1 +- (GEN) Corretta quota assoluta posizione testa trave in caso di pinza 5 e testa rimasta bassa +- (GEN) Se ultima lavorazione pezzo precedente ha stesso utensile della prima lavorazione pezzo successivo, la speed resta accesa + Versione 2.7g4 (23/07/2025) - (SIM-GEN) Aggiunto parametro configurabile da TS3 per massima sporgenza trave in coda per pinza 5. Ticket#2538 diff --git a/Version.lua b/Version.lua index 862aa30..2e7c846 100644 --- a/Version.lua +++ b/Version.lua @@ -3,7 +3,7 @@ local InfoCommon_STD_PP = { NAME = 'Common_ONE-PF', -- nome script PP standard - VERSION = '2.7g4', -- versione script + VERSION = '2.7h1', -- versione script MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel }