diff --git a/Common_ONE-PF.NUM.mlpe b/Common_ONE-PF.NUM.mlpe index 650675b..add3f5f 100644 --- a/Common_ONE-PF.NUM.mlpe +++ b/Common_ONE-PF.NUM.mlpe @@ -315,7 +315,7 @@ function OnDispositionEnd() if #EMT.MDCHAR > 0 then MyOutputNoNum( '(PART UNLOAD)') -- movimento intermedio di apertura pinza-rulli per evitare di trovare delle collisioni - EmitParkRoller( EMT.TPOS, false, false) + EmitParkRoller( EMT.TPOS, false) for i = 1, #EMT.MDCHAR do EmitMoveDataChars( EMT.MDCHAR[i]) if EMT.MDCHAR[i].V1 then EMT.V1POS = EMT.MDCHAR[i].V1 end @@ -530,7 +530,7 @@ function OnMachiningEnd() elseif EMT.AUXTYPE == 'U' then EmtOutput( '(PART UNLOAD)') -- movimento intermedio di apertura pinza-rulli per evitare di trovare delle collisioni - EmitParkRoller( EMT.TPOS, false, false) + EmitParkRoller( EMT.TPOS, false) EMT.V1POS = EMT.V1NEXTPOS EMT.V2POS = EMT.V2NEXTPOS elseif EMT.AUXTYPE == 'P' then @@ -927,6 +927,11 @@ function OnRapid() -- eventuale movimento carrelli for i = 1, #EMT.AUXCMD do ProcessPathStartAux( EMT.AUXCMD[i], i) + -- se ultimo comando e lavorazione di split, sgancio il carro Y1 + if i == #EMT.AUXCMD and EMT.MCHSPLIT and not EMT.TO_SPECSPLIT and not EMT.TO_FALL then + EMT.SPLIT_Y1DELTA = EMT.Y1DELTA + EMT.Y1DELTA = nil + end end EMT.AUXCMD = {} -- se Split lascio agganciata solo la pinza Y2 alla fine dei movimenti @@ -966,10 +971,13 @@ function OnRapid() end if bParkV or bNlhParkV then - local bMchSplit = bSplitMach + local bMchSplit = ( bNlhParkV and EMT.MCHSPLIT and bSplit) + local bAgg = EgtExistsInfo( EMT.PATHID, 'CNT') + if EMT.SPLIT_Y1DELTA and not EMT.MCHSPLIT then EMT.Y1DELTA = EMT.SPLIT_Y1DELTA end local dPosT = EMT.TPOS or EMT.L1op - EmitParkRoller( dPosT, bMchSplit) + EmitParkRoller( dPosT, bMchSplit, bAgg) end + if EMT.SPLIT_Y1DELTA then EMT.Y1DELTA = EMT.SPLIT_Y1DELTA end -- se era stato lanciata la preselezione di un utensile, prima di muovere la testa asopetto che sia finito if EMT.START_PRESEL then @@ -1180,6 +1188,7 @@ function OnRapid() EMT.POSTROT = false EMT.RELOAD = false EMT.RELOAD2 = nil + EMT.SPLIT_Y1DELTA = nil end -- se taglio di coda senza residuo da scaricare, emetto M175 per accelerare il carico della barra successiva @@ -2358,14 +2367,14 @@ function EmitResetMachining( bNextTool) end --------------------------------------------------------------------- -function EmitParkRoller( dPosT, bSplitCut, bUsePrevDelta) +function EmitParkRoller( dPosT, bSplitCut, bAgg) -- se entrambe già parcheggiate, non devo fare alcunché if ( EMT.V1POS - ParkV1) > -0.1 and ( EMT.V2POS - ParkV2) < 0.1 then return end -- Assegno quote pinze correnti - local dY1Delta = EgtIf( bUsePrevDelta, EMT.Y1PREVDELTA, EMT.Y1DELTA) - local dY2Delta = EgtIf( bUsePrevDelta, EMT.Y2PREVDELTA, EMT.Y2DELTA) + local dY1Delta = EMT.Y1DELTA + local dY2Delta = EMT.Y2DELTA -- Parcheggi pinze - local MyParkY1 = ParkY1 + AggLoad + local MyParkY1 = ParkY1 + EgtIf( bAgg, AggLoad, 0) local MyParkY2 = ParkY2 -- le parcheggio local MDChar = {} @@ -2438,6 +2447,9 @@ function EmitParkRoller( dPosT, bSplitCut, bUsePrevDelta) MDChar.IniStatV2 = 3 MDChar.MovType = MDChar.MovType | 2 end + if EMT.SPLIT_Y1DELTA and EMT.SPLIT_Y1DELTA + dPosT < MyParkY1 then + MDChar.Y1 = MyParkY1 + end EmitMoveDataChars( MDChar) EmitMoveStartChars( MDChar.MovType) EmitMoveWaitChars( MDChar.MovType) diff --git a/Essetre-PF.mlde b/Essetre-PF.mlde index cc1cd18..52eafc8 100644 --- a/Essetre-PF.mlde +++ b/Essetre-PF.mlde @@ -32,7 +32,7 @@ require( 'EmtGenerator') EgtEnableDebug( false) -PP_VER = '3.1f1_RC5' +PP_VER = '3.1f1_RC7' PP_NVER = '3.1.6.1' MIN_MACH_VER = '2.5k1' MACH_NAME = EgtGetCurrMachineName()