Compare commits

...

6 Commits

Author SHA1 Message Date
andrea.villa 7c0e6a816e - Allineamento con common ver. 2.6d2
- Aggiunto parametro ForceToCloseRollersGate
2024-04-12 08:54:43 +02:00
andrea.villa dd552b9180 Merge branch 'develop' 2024-03-28 12:27:02 +01:00
andrea.villa 67609582e4 Allineamento con common ver. 2.6d1 2024-03-28 12:26:54 +01:00
andrea.villa 682077b6a1 Merge remote-tracking branch 'origin/master' into develop 2024-03-26 08:21:14 +01:00
luca.mazzoleni 335a8d2e40 - aggiunti portautensili custom 2024-03-08 18:14:20 +01:00
luca.mazzoleni 6ada8ecf10 - Allineamento con common ver. 2.6c3
- In mlde aggiunto parametro EstimationRapidMultiplier per correggere la stima tempi su macchine vecchie (anche da TS3v7).
2024-03-05 12:02:16 +01:00
10 changed files with 244 additions and 85 deletions
+84 -39
View File
@@ -42,13 +42,17 @@ function OnProgramStart()
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or EgtGetCurrMachGroup() or GDB_ID.NULL
local nPattId = EgtGetInfo( BtlInfoId, 'PATTID', 'i') or 40
EmtOutput( '%' .. EgtNumToString( nPattId,-1))
-- aggiungo prefisso per commentae commenti iniziali se la macchina è utilizzata per fare i test
local sPrefixCommentLine = '' ; if IS_TEST_MACHINE then sPrefixCommentLine = '//' end
if EMT.INFO then
EmtOutput( '('..EMT.INFO..')')
EmtOutput( sPrefixCommentLine..'('..EMT.INFO..')')
else
EmtOutput( '(Program Start)')
end
EmtOutput( '('.. CSP_INFO..')')
EmtOutput( '('.. MACHINE_INFO..')\n')
EmtOutput( sPrefixCommentLine..'('.. CSP_INFO..')')
EmtOutput( sPrefixCommentLine..'('.. MACHINE_INFO..')\n')
-- Se modalità test, aggiungo linee per muovere tappeto e alzare la testa (in automatico viene fatto dal main residente)
if TEST_USE then
EmitTestProgramStart()
@@ -264,22 +268,38 @@ function OnDispositionEnd()
end
-- se altrimenti disposizione intermedia, eventuale rotazione
elseif IsMidPhase( EMT.PHASE) or IsEnd2Phase( EMT.PHASE) then
-- recupero le rotazioni delle fasi corrente e precedente
local nRot = GetPhaseRot( EMT.PHASE)
local nPrevRot = GetPhaseRot( EMT.PHASE - 1)
-- verifico se sono diverse
if nRot ~= nPrevRot then
local nDeltaRot = nRot - nPrevRot
-- rotazione automatica o manuale (sempre con il medesimo comando)
local sOut = 'M180 L0=' .. tostring( nDeltaRot)
EmtOutput( sOut)
-- se rotazioni diverse, emetto il comando e aggiorno lo stato
if VerifyEmitRotation() then
-- imposto stato post-rotazione
EMT.POSTROT = true
-- imposto recupero sovramateriale in X non più presente
EMT.X_OFF = EMT.HOVM
end
-- se altrimenti disposizione intermedia speciale con eventuale rotazione
elseif IsMid2Phase( EMT.PHASE) then
-- emissione movimento carrelli
EMT.AUXCMD = {}
if #EMT.MDCHAR > 0 then
EmtOutput( '(ROTATION)')
end
for i = 1, #EMT.MDCHAR do
EmitMoveDataChars( EMT.MDCHAR[i])
end
if #EMT.MDCHAR > 0 then
EmitMoveStartChars( 1)
EmitMoveStartChars( 2)
end
EMT.MDCHAR = {}
EMT.AUXTYPE = nil
-- se rotazioni diverse, emetto il comando e aggiorno lo stato
if VerifyEmitRotation() then
-- imposto stato post-rotazione
EMT.POSTROT = true
-- imposto recupero sovramateriale in X non più presente
EMT.X_OFF = EMT.HOVM
end
-- altrimenti disposizione finale, eventuale scarico pezzo lavorato se non ci sono lavorazioni
else
else
if #EMT.MDCHAR > 0 then
MyOutputNoNum( '(PART UNLOAD)')
for i = 1, #EMT.MDCHAR do
@@ -1108,7 +1128,7 @@ function OnRapid()
end
EMT.MDCHAR = {}
-- se necessario allargo le cabine
if RollerParkingNeeded( EMT.HEAD, PrevR1, PrevR2, EMT.R1, EMT.R2) or
if RollerParkingNeeded( EMT.HEAD, PrevR1, PrevR2, EMT.R1, EMT.R2) or EMT.TOOL ~= EMT.PREVTOOL or
EMT.V1POS < EMT.V1NEXTPOS - 1 or EMT.V2POS > EMT.V2NEXTPOS + 1 then
local dPosT = EMT.TPOS or EMT.L1op
EmitParkRoller( dPosT, EMT.MCHSPLIT)
@@ -1427,7 +1447,8 @@ function OnRapid()
-- se Split o Presplit lascio agganciata solo la pinza Y2 alla fine dei movimenti
local sNextTool = GetNextTool( EMT.MCHID)
-- 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' or EMT.HEAD == 'H22'
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
local CurrL3o = EMT.L3o
EMT.L3o = EMT.L3op
EmitZmax( true, true, bToXhome, EMT.R1p, EMT.R2p, EMT.MCHSPLIT)
@@ -2148,9 +2169,10 @@ function PreparePostRotation( sCmd, nInd)
elseif Cmd[1] == '2' then
if Cmd[2] == 'Y1' then
-- tolgo eventuale sovramateriale presente sul pezzo in posizione iniziale (la misura laser è ora col finito)
local MDChar = { Y1=tonumber(Cmd[3])-EMT.HOVM, IniStatY1=75, V1=ParkV1, FinStatY1=-1, BeamVise=0, Aux=' (E80058=0)', MovType=1}
local MDChar = { Y1=tonumber(Cmd[3])-EMT.HOVM, IniStatY1=75, V1=ParkV1, V2=ParkV2, FinStatY1=-1, BeamVise=0, Aux=' (E80058=0)', MovType=1}
table.insert( EMT.MDCHAR, MDChar)
EMT.V1POS = ParkV1
EMT.V2POS = ParkV2
elseif Cmd[2] == 'T' then
local MDChar = { Y1=tonumber(Cmd[3]), IniStatY1=76, FinStatY1=EMT.FSY1, BeamVise=0, MovType=1}
table.insert( EMT.MDCHAR, MDChar)
@@ -2444,6 +2466,48 @@ function GetSpecUnloading( nPathId)
return ( sVal == '0,Unloading SpecSplit')
end
---------------------------------------------------------------------
function VerifyEmitRotation()
-- recupero le rotazioni delle fasi corrente e precedente
local nRot = GetPhaseRot( EMT.PHASE)
local nPrevRot = GetPhaseRot( EMT.PHASE - 1)
-- se sono uguali non devo fare alcunchè
if nRot == nPrevRot then
return false
end
-- se ho la testa 2, quindi tipo PF
if EgtGetHeadId( 'H21') then
local nDeltaRot = nRot - nPrevRot
-- rotazione automatica o manuale (sempre con il medesimo comando)
local sOut = 'M180 L0=' .. tostring( nDeltaRot)
EmtOutput( sOut)
-- altrimenti se ONE
else
if nRot > nPrevRot then nRot = nRot - 4 end
local nDeltaRot = nRot - nPrevRot
-- se rotazione automatica richiesta e possibile
local dRefLen = EgtIf( IsMid2Phase( EMT.PHASE) or IsEnd2Phase( EMT.PHASE), EMT.LT, EMT.LB)
-- se rotazione automatica richiesta e possibile
if AutomaticRotation and dRefLen >= AutoRotMinLen then
local sOut = 'M180 L0=' .. tostring( -nDeltaRot)
EmtOutput( sOut)
else
local sOut
if nDeltaRot == -1 then
sOut = 'M151'
elseif nDeltaRot == -2 then
sOut = 'M152'
elseif nDeltaRot == -3 then
sOut = 'M153'
end
EmtOutput( sOut)
EmtOutput( 'M86')
EmtOutput( 'G4F.5')
end
end
return true
end
---------------------------------------------------------------------
function EmitZmax( bReset, bEnd, bXhome, PrevR1, PrevR2, bSplitCut, bUsePrevDelta)
if bReset then
@@ -2668,7 +2732,10 @@ end
---------------------------------------------------------------------
function EmitResetMachining()
if ( EMT.TOOL ~= GetNextTool( EMT.MCHID) and IsLastPath( EMT.PATHID)) or GetSpecUnloading( EMT.PATHID) or GetFall( EMT.PATHID) then
EmtOutput( 'M05')
-- se da MLDE parametro non settato, o settato a true, scrivo il comando arresto mandrino
if WriteM05Command == nil or WriteM05Command then
EmtOutput( 'M05')
end
end
local sOut = 'G157 EA1'
EmtOutput( sOut)
@@ -2762,28 +2829,6 @@ function EmitParkRoller( dPosT, bSplitCut, bUsePrevDelta)
EMT.TPOS = dPosT
end
---------------------------------------------------------------------
function GetNextTool( nMchId)
-- inizializzo prossimo utensile
local sNextTool
-- recupero lavorazione successiva
local nNextMchId = EgtGetNextActiveOperation( nMchId)
while nNextMchId do
if EgtGetOperationType( nNextMchId) ~= MCH_OY.DISP then
break
end
nNextMchId = EgtGetNextActiveOperation( nNextMchId)
end
-- se trovata
if nNextMchId and EgtSetCurrMachining( nNextMchId) then
sNextTool = EgtGetMachiningParam( MCH_MP.TOOL)
end
-- ripristino stato corrente
EgtSetCurrMachining( EMT.MCHID)
EgtTdbSetCurrTool( EMT.TOOL)
return sNextTool
end
---------------------------------------------------------------------
function PreselectNextDiffHead( nMchId, sHead)
-- se non ho due teste, esco subito
+98 -37
View File
@@ -359,7 +359,6 @@ function OnSimulDispositionStart()
if EMT.VMILL and #EMT.VMILL > 0 then
EgtSetStatus( EMT.SCRAP or GDB_ID.NULL, GDB_ST.OFF)
end
-- se altrimenti fasi intermedia o finale speciali, aggancio primo grezzo alla tavola e gli altri in posizione pre-carico
elseif IsMid2Phase( EMT.PHASE) or IsEnd2Phase( EMT.PHASE) then
-- se cambiata giacitura, lo segnalo
@@ -454,6 +453,21 @@ function OnSimulDispositionEnd()
EMT.FALL = false
EMT.TO_FALL = false
end
-- se disposizione intermedia
if IsMidPhase( EMT.PHASE) or IsEnd2Phase( EMT.PHASE) then
-- se le rotazioni delle fasi corrente e precedente sono diverse
if GetPhaseRot( EMT.PHASE) ~= GetPhaseRot( EMT.PHASE - 1) then
-- imposto stato post-rotazione
EMT.POSTROT = true
end
-- se altrimenti disposizione intermedia speciale con eventuale rotazione
elseif IsMid2Phase( EMT.PHASE) then
-- se le rotazioni delle fasi corrente e precedente sono diverse
if GetPhaseRot( EMT.PHASE) ~= GetPhaseRot( EMT.PHASE - 1) then
-- imposto stato post-rotazione
EMT.POSTROT = true
end
end
EMT.SPLIT = false
EMT.SPECSPLIT = false
EMT.TO_SPECSPLIT = false
@@ -494,6 +508,8 @@ function OnSimulToolSelect( dPosA)
EgtSetAxisPos( 'C1', MyParkCSawC1)
EgtSetAxisPos( 'B1', ParkCSawB1)
EgtSetAxisPos( 'X1', ParkCSawX1)
-- l'utensile viene caricato qui, quindi setto come già cambiato
EMT.PREVHEAD_H1 = EMT.HEAD
else
-- imposto home dell'asse C2 (A=0 -> T111, A=-90 -> T112)
local MyParkCSawC2 = GetChainSawCHomeFromVirtualAxis( dPosA)
@@ -501,6 +517,8 @@ function OnSimulToolSelect( dPosA)
EgtSetAxisPos( 'C2', MyParkCSawC2)
EgtSetAxisPos( 'B2', ParkCSawB2)
EgtSetAxisPos( 'X2', ParkCSawX2)
-- l'utensile viene caricato qui, quindi setto come già cambiato
EMT.PREVHEAD_H2 = EMT.HEAD
end
-- Imposto visualizzazione
EgtSetMode( EgtGetHeadId( EMT.HEAD) or GDB_ID.NULL, GDB_MD.STD)
@@ -638,10 +656,10 @@ function OnSimulToolDeselect( dPrevA)
-- se devo scaricare un utensile normale
else
local nSetHead = GetHeadSet( EMT.HEAD)
if nSetHead == 1 then
if nSetHead == 1 and EMT.PREVHEAD_H1 then
local MyParkX1 = EgtIf( GetHeadTCSet( EMT.HEAD, EMT.TCPOS) == 'Head1_TC1', ParkX1, ParkFrnX1)
SimulMoveAxis( 'X1', MyParkX1, MCH_SIM_STEP.RAPID)
else
elseif EMT.PREVHEAD_H2 then
SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID)
end
end
@@ -727,17 +745,6 @@ function OnSimulMachiningStart()
end
-- salvo dati utensile
local nSetHead = GetHeadSet( EMT.HEAD)
-- per gruppo testa 1
if nSetHead == 1 then
EMT.PREVTOOL_H1 = EMT.TOOL
EMT.PREVHEAD_H1 = EMT.HEAD
EMT.PREVTCPOS_H1 = EMT.TCPOS
-- per gruppo testa 2
elseif nSetHead == 2 then
EMT.PREVTOOL_H2 = EMT.TOOL
EMT.PREVHEAD_H2 = EMT.HEAD
EMT.PREVTCPOS_H2 = EMT.TCPOS
end
-- recupero alcuni dati della lavorazione
EMT.MCHNAME = EgtGetOperationName( EMT.MCHID)
EMT.MCHTYPE = EgtGetMachiningParam( MCH_MP.TYPE)
@@ -813,6 +820,23 @@ function OnSimulMachiningEnd()
if EMT.DOU_TYPE and not EMT.ZMAX then EMT.DOU_TO_ZMAX = true end
EMT.DOU_TYPE = nil
EMT.DOU_TOOL = nil
-- salvo dati utensile
local nSetHead = GetHeadSet( EMT.HEAD)
-- se non ho già tolto la sega a catena, aggiorno valori
if not EMT.CHSAW_OUT then
-- per gruppo testa 1
if nSetHead == 1 then
EMT.PREVTOOL_H1 = EMT.TOOL
EMT.PREVHEAD_H1 = EMT.HEAD
EMT.PREVTCPOS_H1 = EMT.TCPOS
-- per gruppo testa 2
elseif nSetHead == 2 then
EMT.PREVTOOL_H2 = EMT.TOOL
EMT.PREVHEAD_H2 = EMT.HEAD
EMT.PREVTCPOS_H2 = EMT.TCPOS
end
end
end
---------------------------------------------------------------------
@@ -911,7 +935,8 @@ function OnSimulMoveStart()
local bParkV = false
if EMT.MCHFIRST then
-- se rulli più chiusi del richiesto o cambio direzione utensile (tranne solo asse B con C0 o equivalenti) devo mettere i rulli in parcheggio
if V1Pos < EMT.V1NEXTPOS - 1 or V2Pos > EMT.V2NEXTPOS + 1 or RollerParkingNeeded( EMT.HEAD, EMT.R1p, EMT.R2p, EMT.R1, EMT.R2) then
if V1Pos < EMT.V1NEXTPOS - 1 or V2Pos > EMT.V2NEXTPOS + 1 or RollerParkingNeeded( EMT.HEAD, EMT.R1p, EMT.R2p, EMT.R1, EMT.R2) or
( EMT.TOOL ~= EMT.PREVTOOL_H1 and EMT.TOOL ~= EMT.PREVTOOL_H2) then
bParkV = true
EMT.A3 = ParkV1
EMT.A4 = ParkV2
@@ -1089,6 +1114,23 @@ function OnSimulMoveStart()
end
-- altrimenti sega a catena
else
-- se anche precedente con sega a catena ma depositata, devo riprenderla
if EMT.CHSAW_OUT then
local dPosA = GetCurrChainSawingVirtualAxis()
EgtSetMode( EgtGetHeadId( EMT.HEAD), GDB_MD.HIDDEN)
OnSimulToolDeselect()
EgtLoadTool( EMT.HEAD, 1, EMT.TOOL)
ShowToolInTcPos( EMT.TCPOS, false)
OnSimulToolSelect( dPosA)
-- recupero i dati dato che ho scaricato motosega e preso quelli dell'utensile di default
EmtModifyAxisHome( 'Z2', GetChainSawZHomeFromVirtualAxis( dPosA))
EmtModifyAxisHome( 'C2', GetChainSawCHomeFromVirtualAxis( dPosA))
EmtModifyAxisHome( 'B2', ParkCSawB2)
B2Home = EgtGetAxisHomePos( 'B2')
C2Home = EgtGetAxisHomePos( 'C2')
Z2Home = EgtGetAxisHomePos( 'Z2')
EMT.CHSAW_OUT = nil
end
-- se motosega configurata per lavorazioni di fianco o circa orizzontale
if dPosA == 0 or abs( EMT.R2) < 10 then
SimulMoveAxes( 'X2', EMT.L2, MCH_SIM_STEP.RAPID, 'C2', EMT.R1, MCH_SIM_STEP.COLLROT)
@@ -1221,7 +1263,8 @@ function OnSimulMoveEnd()
-- se Split o Presplit lascio agganciata solo la pinza Y2 alla fine dei movimenti
local sNextTool = GetNextTool( EMT.MCHID)
-- 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' or EMT.HEAD == 'H22'
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
-- eseguo
ExecMoveZmax( EMT.MCHSPLIT, bToXhome)
EMT.TO_ZMAX = nil
@@ -1557,6 +1600,14 @@ function ExecMoveZmax( bMchSplit, btoXHome)
if EMT.SB > 650 and abs( EMT.R3) < 0.1 then
SimulMoveAxes( 'Z1', ParkCSawZ1, MCH_SIM_STEP.RAPID, 'B1', ParkB1, MCH_SIM_STEP.COLLROT)
end
if btoXHome then
EgtUnloadTool( EMT.HEAD, 1)
ShowToolInTcPos( EMT.TCPOS, true)
EMT.PREVTOOL_H1 = nil
EMT.PREVHEAD_H1 = nil
EMT.PREVTCPOS_H1 = nil
EMT.CHSAW_OUT = true
end
SimulMoveAxes( 'X1', HomeX, MCH_SIM_STEP.RAPID, 'C1', HomeC, MCH_SIM_STEP.COLLROT)
end
@@ -1584,7 +1635,7 @@ function ExecMoveZmax( bMchSplit, btoXHome)
if EMT.SB > 650 and abs( EMT.R3) < 0.1 then
SimulMoveAxes( 'Z2', ParkCSawZ2, MCH_SIM_STEP.RAPID, 'B2', ParkB2, MCH_SIM_STEP.COLLROT)
end
SimulMoveAxes( 'X2', HomeX, MCH_SIM_STEP.RAPID, 'C2', HomeC, MCH_SIM_STEP.COLLROT)
SimulMoveAxes( 'X2', HomeX, MCH_SIM_STEP.RAPID, 'C2', HomeC, MCH_SIM_STEP.COLLROT)
end
end
EMT.ZMAX = true
@@ -1619,10 +1670,14 @@ function ExecUnloading()
EgtMove( nLayId, vtMove, GDB_RT.GLOB)
EgtSetLevel( vMillId, GDB_LV.USER)
-- aggiungo gli spigoli
local nFirstId, nCount = EgtVolZmapGetEdges( vMillId, nLayId)
if nFirstId then
for nId = nFirstId, nFirstId + nCount - 1 do
EgtSetColor( nId, Color3d( 96, 96, 96))
if EgtVolZmapSetShowEdges then
EgtVolZmapSetShowEdges( vMillId, true)
else
local nFirstId, nCount = EgtVolZmapGetEdges( vMillId, nLayId)
if nFirstId then
for nId = nFirstId, nFirstId + nCount - 1 do
EgtSetColor( nId, Color3d( 96, 96, 96))
end
end
end
-- rilascio Vmill
@@ -2119,18 +2174,19 @@ end
---------------------------------------------------------------------
-- *** ESTIMATION T&L ***
---------------------------------------------------------------------
local RAPID_X_FEED = 70000 -- mm/min
local RAPID_Y_FEED = 100000 -- mm/min
local RAPID_Z_FEED = 32000 -- mm/min
local RAPID_C_FEED = 15000 -- deg/min
local RAPID_B_FEED = 15000 -- deg/min
local RAPID_MIN_T = 0.1 -- s
local LOAD_T = 2 -- s
local CHAR_ONE_MOVE_T = 1 -- s
local ROTATION_T = 40 -- s
local SPLIT_T = 6 -- s
local UNLOAD_T = 4 -- s
local FALL_T = 2 -- s
local ESTIMATION_RAPID_COEFF = EstimationRapidMultiplier or 1
local RAPID_X_FEED = 70000 / ESTIMATION_RAPID_COEFF -- mm/min
local RAPID_Y_FEED = 100000 / ESTIMATION_RAPID_COEFF -- mm/min
local RAPID_Z_FEED = 32000 / ESTIMATION_RAPID_COEFF -- mm/min
local RAPID_C_FEED = 15000 / ESTIMATION_RAPID_COEFF -- deg/min
local RAPID_B_FEED = 15000 / ESTIMATION_RAPID_COEFF -- deg/min
local RAPID_MIN_T = 0.1 * ESTIMATION_RAPID_COEFF -- s
local LOAD_T = 2 * ESTIMATION_RAPID_COEFF -- s
local CHAR_ONE_MOVE_T = 1 * ESTIMATION_RAPID_COEFF -- s
local ROTATION_T = 40 * ESTIMATION_RAPID_COEFF -- s
local SPLIT_T = 6 * ESTIMATION_RAPID_COEFF -- s
local UNLOAD_T = 4 * ESTIMATION_RAPID_COEFF -- s
local FALL_T = 2 * ESTIMATION_RAPID_COEFF -- s
---------------------------------------------------------------------
function OnEstimStart()
@@ -2196,9 +2252,9 @@ function OnEstimDispositionEnd()
-- Se disposizione inizio o rimanenza
if IsStartOrRestPhase( EMT.PHASE) then
;
-- se altrimenti disposizione intermedia, eventuale rotazione
elseif IsMidPhase( EMT.PHASE) then
-- recupero le rotazioni delle fasi corrente e precedente
-- se altrimenti disposizione intermedia o finale dopo separazione e rotazione, eventuale rotazione
elseif IsMidPhase( EMT.PHASE) or IsMid2Phase( EMT.PHASE) or IsEnd2Phase( EMT.PHASE) then
-- recupero le rotazioni delle fasi corrente e precedente
local nRot = GetPhaseRot( EMT.PHASE)
local nPrevRot = GetPhaseRot( EMT.PHASE - 1)
-- verifico se sono diverse
@@ -2654,7 +2710,12 @@ function GetNextTool( nMchId)
-- recupero lavorazione successiva
local nNextMchId = EgtGetNextActiveOperation( nMchId)
while nNextMchId do
if EgtGetOperationType( nNextMchId) ~= MCH_OY.DISP then
-- 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
return nil
end
else
break
end
nNextMchId = EgtGetNextActiveOperation( nNextMchId)
+14 -5
View File
@@ -1116,8 +1116,12 @@ function SpecialCalcMachiningEncumbrance( nMchId, bPreCut)
end
b3Enc = EgtGetBBoxGlob( EgtGetAxisId( 'C2'), GDB_BB.ONLY_VISIBLE)
end
local dRollFront = max( b3Enc:getMax():getX(), MIN_FRONT_ENG_V) + SIC_V
local dRollBack = max( -b3Enc:getMin():getX(), MIN_BACK_ENG_V) + SIC_V
-- Forzo la distanza di sicurezza da utensile
local nSecRollerDist = EgtGetValInNotes( EgtTdbGetCurrToolParam( MCH_TP.USERNOTES), 'SECDIST', 'i') or SIC_V
local dRollFront = max( b3Enc:getMax():getX(), MIN_FRONT_ENG_V) + nSecRollerDist
local dRollBack = max( -b3Enc:getMin():getX(), MIN_BACK_ENG_V) + nSecRollerDist
EgtOutLog( ' RollFront = ' .. EgtNumToString( dRollFront, 1) .. ' RollBack = ' .. EgtNumToString( dRollBack, 1), 3)
-- Calcolo della posizione della Punta Utensile rispetto allo Zero Macchina
local ptTip
@@ -1652,19 +1656,24 @@ function SpecAdjustCarriages( WorkTab)
local bCloseV = false
if WorkTab.dY1DeltaI then
if WorkTab.dY1DeltaI <= MinJoin + WorkTab.dV1PosI - WorkTab.dV2PosI + 2 * AGG_V + EMC.HCING + EMC.HOVM + EgtIf( EMC.CNT == 1, AggLoad, 0) then
bCloseV = true
bCloseV = true
end
end
if WorkTab.dY2DeltaI then
if EMC.LB - WorkTab.dY2DeltaI <= MinJoin + WorkTab.dV1PosI - WorkTab.dV2PosI + 2 * AGG_V + EgtIf( SPLIT, EMC.TCING, 0) + EgtIf( EMC.CNT == 1, AggLoad, 0) then
bCloseV = true
bCloseV = true
end
end
if WorkTab.dY2DeltaMinF then
if EMC.LB - WorkTab.dY2DeltaMinF <= MinJoin + WorkTab.dV1PosI - WorkTab.dV2PosI + 2 * AGG_V + EgtIf( SPLIT, EMC.TCING, 0) + EgtIf( EMC.CNT == 1, AggLoad, 0) then
bCloseV = true
bCloseV = true
end
end
-- se i pezzi del cliente sono molto storti, si forza la chiusura per evitare che vada a sbattere. Se parametro non presente, si chiude solo se necessario
if ForceToCloseRollersGate then
bCloseV = true
end
WorkTab.bCloseV = bCloseV
EgtOutLog( ' Tool : '..( EgtIf( bChangedTool, 'CHANGED', 'same')).. ' CloseV : '..( EgtIf( bCloseV, 'TRUE', 'false')), 1)
+10 -1
View File
@@ -50,12 +50,17 @@
-- 2024/02/29 ver 2.6c1 Allineamento con common ver. 2.6c1
-- 2024/03/04 ver 2.6c2 Modificato log con nome macchina
-- Allineamento con common ver. 2.6c2
-- 2024/03/05 ver 2.6c3 Allineamento con common ver. 2.6c3
-- In mlde aggiunto parametro EstimationRapidMultiplier per correggere la stima tempi su macchine vecchie. Letto anche da TS3v7 come COEFF_STIMATEMPI.
-- 2024/03/28 ver 2.6d1 Allineamento con common ver. 2.6d1
-- 2024/04/12 ver 2.6d2 Allineamento con common ver. 2.6d2
-- Aggiunto parametro ForceToCloseRollersGate
-- Intestazioni
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.6c2'
PP_VER = '2.6d2'
MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-PF'
@@ -186,6 +191,8 @@ AutomaticRotation = true
OptimizedLoadBeam = true
AutoRotMinLen = 0
CoeffVM = 0.5
EstimationRapidMultiplier = 1
ForceToCloseRollersGate = false
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-PF.data"
@@ -269,6 +276,8 @@ if EgtExistsFile( sData) then
if Machine.Offsets.SAW2OFFSZ then Saw2OffsZ = Machine.Offsets.SAW2OFFSZ end
if Machine.Offsets.DEFTCPOS1 then DefTcPos1 = ( 'T' .. Machine.Offsets.DEFTCPOS1) end
if Machine.Offsets.DEFTCPOS2 then DefTcPos2 = ( 'T' .. Machine.Offsets.DEFTCPOS2) end
if Machine.Offsets.COEFF_STIMATEMPI and Machine.Offsets.COEFF_STIMATEMPI > 0 then EstimationRapidMultiplier = Machine.Offsets.COEFF_STIMATEMPI end
if Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO then ForceToCloseRollersGate = Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO == 1 end
-- aggiustamenti
MinY1 = MinV1 + MinDeltaYV
MaxY1 = MaxMchY1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+37 -2
View File
@@ -1,7 +1,42 @@
==== Essetre_StdPF Update Log ====
==== Common_ONE-PF Update Log ====
Versione 2.6d2 (12/04/2024)
- (MLDE-SIM-GEN) Aggiunta variabile FACOLTATIVA 'ForceToCloseRollersGate' ( che legge la variabile da TS3 'CHIUDI_RULLI_SCAMBIO') in mlde per forzare chiusura paratie rulli
durante scambio pinze per facilitare passaggio pezzi molto storti. Se non presente chiude solo se necessario.
Versione 2.6d1 (28/03/2024)
- (GEN) Rimosso da generazione funzione GetNextTool duplicata
- (SIM-GEN) Se fase successiva start di un altro pezzo, la GetNextTool restituisce nil, per forzare movimento home in caso di utensili speciali
- (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
- (SIM) Corretto movimento in simulazione se motosega su testa 2
Versione 2.6c9 (26/03/2024)
- (SIM) Corretta gestione cambio utensile con motosega. In alcuni casi non era coerente con generazione
- (GEN) In 'PreparePostRotation' si resetta sempre anche la paratia in uscita (Ticket#1733)
Versione 2.6c8 (22/03/2024)
- (SIM) Miglioramento visualizzazione spigoli VMILL alla fine della simulazione. Funzione: EgtVolZmapSetShowEdges. CAM5 ver. 2.6c2 FACOLTATIVA.
Versione 2.6c7 (11/03/2024)
- (SIM-GEN) Aggiunta gestione parametro "SECDIST". Distanza di sicurezza tra paratia con rulli e utensile/testa. Parametro da inserire nelle note utensile.
- (MLPE-GEN) Aggiunto parametro "WriteM05Command" (NON OBBLIGATORIO) per decidere se scrivere il comando M05 per arresto mandrino. Default a true.
Versione 2.6c6 (08/03/2024)
- (SIM-GEN) Gestione rotazioni 90° come su FAST, caso MID2 (split/cut prima delle rotazioni)
Versione 2.6c5 (07/03/2024)
- (GEN) Per ribaltamento, i comandi si differenziano per macchina. Sembra che ONE e PF abbiano comandi diversi. In attesa di conferma da parte di Essetre
- (SIM-GEN) Se cambiato utensile, si aprono sempre paratie
- (SIM) Spostato salvataggio dati utensile precedente in MachiningEnd, prima era in MachininsStart
Versione 2.6c4 (06/03/2024)
- (SIM-GEN) Alla fine del movimento a Z-MAX, in home con lama solo se si cambia utensile. Prima andava sempre in home se era lama, anche se non doveva cambiare utensile
Versione 2.6c3 (05/03/2024)
- (MLDE-SIM) Aggiunta variabile FACOLTATIVA 'EstimationRapidMultiplier' in mlde per regolare il tempo stimato di rapido su macchine vecchie. Se non presente default 1.
Versione 2.6c2 (04/03/2024)
- (MLDE-GEN) Aggiunta variabile 'MACH_NAME' in MLDE con nome macchina
- (MLDE-GEN) Aggiunta variabile 'MACH_NAME' in mlde con nome macchina
Versione 2.6c1 (29/02/2024)
- (SIM) Gestione rimozione VMILL per tagli a cubetti Zig-Zag
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_ONE-PF', -- nome script PP standard
VERSION = '2.6c2', -- versione script
VERSION = '2.6d2', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}