Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e2a3a65ebd | |||
| c0b6ef49d6 | |||
| f900809a26 | |||
| f78e1f1e32 | |||
| 118d7cc640 | |||
| 0e02681779 | |||
| 8612f06d22 | |||
| b5150f014b | |||
| 9912fa7446 | |||
| 7785f88831 | |||
| a399b585b2 | |||
| 418a649d59 | |||
| 0b11fb0c60 | |||
| c11a835b98 | |||
| 60c3293429 | |||
| 9d135a9d44 |
@@ -1229,6 +1229,14 @@ function OnRapid()
|
|||||||
-- calcolo per piano generico
|
-- calcolo per piano generico
|
||||||
CalcInterpPlane()
|
CalcInterpPlane()
|
||||||
EMT.REFLOC = true
|
EMT.REFLOC = true
|
||||||
|
-- salvo posizione attuale
|
||||||
|
local OldL1 = EMT.L1
|
||||||
|
local OldL2 = EMT.L2
|
||||||
|
local OldL3 = EMT.L3
|
||||||
|
-- imposto posizione precedente (non contiene l'offset in X per sovramateriale di testa EMT.X_OFF)
|
||||||
|
EMT.L1 = EMT.L1o
|
||||||
|
EMT.L2 = EMT.L2o
|
||||||
|
EMT.L3 = EMT.L3o
|
||||||
-- trasformo i punti nel piano
|
-- trasformo i punti nel piano
|
||||||
MyAdjustLinearAxes()
|
MyAdjustLinearAxes()
|
||||||
EmtAdjustRotaryAxes()
|
EmtAdjustRotaryAxes()
|
||||||
@@ -1241,10 +1249,6 @@ function OnRapid()
|
|||||||
|
|
||||||
EMT.PLANEACTIVE = true
|
EMT.PLANEACTIVE = true
|
||||||
|
|
||||||
-- annullo precedenti per forzare scrittura
|
|
||||||
EMT.R1p = nil
|
|
||||||
EMT.R2p = nil
|
|
||||||
|
|
||||||
-- emissione movimento
|
-- emissione movimento
|
||||||
local sAxes = EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..
|
local sAxes = EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..
|
||||||
EmtGetAxis('R2')..EmtGetAxis('R1')
|
EmtGetAxis('R2')..EmtGetAxis('R1')
|
||||||
@@ -1628,7 +1632,7 @@ function PrepareMoveChar( sCmd, nInd)
|
|||||||
EMT.Y1POS = MoveY1 or EMT.Y1POS
|
EMT.Y1POS = MoveY1 or EMT.Y1POS
|
||||||
EMT.TPOS = GetCmdAxMove( Cmd, 'T') or EMT.TPOS
|
EMT.TPOS = GetCmdAxMove( Cmd, 'T') or EMT.TPOS
|
||||||
end
|
end
|
||||||
elseif Cmd[1] == '2' then
|
elseif Cmd[1] == '2' or Cmd[1] == '24' then
|
||||||
local MDChar = { IniStatY1=EMT.ISY1, FinStatY1=EMT.FSY1, IniStatY2=EMT.ISY2, FinStatY2=EMT.FSY2, BeamVise=EMT.BV}
|
local MDChar = { IniStatY1=EMT.ISY1, FinStatY1=EMT.FSY1, IniStatY2=EMT.ISY2, FinStatY2=EMT.FSY2, BeamVise=EMT.BV}
|
||||||
local MoveY1 = GetCmdAxMove( Cmd, 'Y1')
|
local MoveY1 = GetCmdAxMove( Cmd, 'Y1')
|
||||||
local MoveY2 = GetCmdAxMove( Cmd, 'Y2')
|
local MoveY2 = GetCmdAxMove( Cmd, 'Y2')
|
||||||
@@ -1718,8 +1722,6 @@ function PrepareMoveChar( sCmd, nInd)
|
|||||||
EMT.V2NEXTPOS = tonumber( Cmd[3])
|
EMT.V2NEXTPOS = tonumber( Cmd[3])
|
||||||
elseif Cmd[1] == '23' then
|
elseif Cmd[1] == '23' then
|
||||||
EMT.W2DELTA = tonumber( Cmd[2])
|
EMT.W2DELTA = tonumber( Cmd[2])
|
||||||
elseif Cmd[1] == '24' then
|
|
||||||
EMT.TPOS = GetCmdAxMove( Cmd, 'T') or EMT.TPOS
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
+136
-65
@@ -1,4 +1,4 @@
|
|||||||
-- Processore standard macchine ONE e PF by EgalWare s.r.l. 2023/11/24
|
-- Processore standard macchine ONE e PF by EgalWare s.r.l. 2026/08/03
|
||||||
|
|
||||||
-- Funzioni generiche indipendenti dal controllo
|
-- Funzioni generiche indipendenti dal controllo
|
||||||
|
|
||||||
@@ -221,7 +221,8 @@ function OnSimulDispositionStart()
|
|||||||
end
|
end
|
||||||
-- Se vero inizio e abilitato creo gli Zmap
|
-- Se vero inizio e abilitato creo gli Zmap
|
||||||
EMT.VMILL = {}
|
EMT.VMILL = {}
|
||||||
if not EMT.SIM1ST and EgtGetInfo( EgtGetCurrMachGroup(), 'Vm', 'b') then
|
if not EMT.SIM1ST then
|
||||||
|
local bShowVMill = EgtGetInfo( EgtGetCurrMachGroup(), 'Vm', 'b')
|
||||||
local nLastOrd = GetPhaseOrd( EgtGetPhaseCount())
|
local nLastOrd = GetPhaseOrd( EgtGetPhaseCount())
|
||||||
local nPartRawId = EgtGetFirstRawPart()
|
local nPartRawId = EgtGetFirstRawPart()
|
||||||
while nPartRawId do
|
while nPartRawId do
|
||||||
@@ -247,7 +248,7 @@ function OnSimulDispositionStart()
|
|||||||
-- determino la risoluzione dello Zmap
|
-- determino la risoluzione dello Zmap
|
||||||
local dTol = 4.71
|
local dTol = 4.71
|
||||||
if EmtGetVMillStep then
|
if EmtGetVMillStep then
|
||||||
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol)
|
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), EMT.VMILLTOL or dTol)
|
||||||
else
|
else
|
||||||
local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ()
|
local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ()
|
||||||
if dArea < 0.075e6 then
|
if dArea < 0.075e6 then
|
||||||
@@ -263,21 +264,25 @@ function OnSimulDispositionStart()
|
|||||||
elseif dArea < 2.4e6 then
|
elseif dArea < 2.4e6 then
|
||||||
dTol = 3.77
|
dTol = 3.77
|
||||||
end
|
end
|
||||||
|
dTol = min( dTol, EMT.VMILLTOL or dTol) -- imposto dTol al valore minore tra quello per volume e quello per spessore lama
|
||||||
end
|
end
|
||||||
dTol = min( dTol, EMT.VMILLTOL or dTol) -- imposto dTol al valore minore tra quello per volume e quello per spessore lama
|
|
||||||
-- creo lo Zmap
|
-- creo lo Zmap
|
||||||
local VMillId = EgtVolZmapBox( nPartRawId, b3Raw:getMin(), b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol, true, GDB_RT.GLOB)
|
local VMillId = EgtVolZmapBox( nPartRawId, b3Raw:getMin(), b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol, true, GDB_RT.GLOB)
|
||||||
if VMillId then
|
if VMillId then
|
||||||
EgtSetName( VMillId, 'VMill')
|
EgtSetName( VMillId, 'VMill')
|
||||||
EgtSetLevel( VMillId, GDB_LV.TEMP)
|
EgtSetLevel( VMillId, GDB_LV.TEMP)
|
||||||
EgtSetColor( VMillId, EgtGetColor( nSolId), false)
|
EgtSetColor( VMillId, EgtGetColor( nSolId), false)
|
||||||
-- nascondo le altre geometrie
|
if bShowVMill then
|
||||||
local nId = EgtGetFirstInGroup( nPartRawId)
|
-- nascondo le altre geometrie
|
||||||
while nId do
|
local nId = EgtGetFirstInGroup( nPartRawId)
|
||||||
if nId ~= VMillId then
|
while nId do
|
||||||
EgtSetStatus( nId, GDB_ST.OFF)
|
if nId ~= VMillId then
|
||||||
|
EgtSetStatus( nId, GDB_ST.OFF)
|
||||||
|
end
|
||||||
|
nId = EgtGetNext( nId)
|
||||||
end
|
end
|
||||||
nId = EgtGetNext( nId)
|
else
|
||||||
|
EgtSetStatus( VMillId, GDB_ST.OFF)
|
||||||
end
|
end
|
||||||
table.insert( EMT.VMILL, VMillId)
|
table.insert( EMT.VMILL, VMillId)
|
||||||
end
|
end
|
||||||
@@ -338,7 +343,9 @@ function OnSimulDispositionStart()
|
|||||||
-- gestione eventuale scarto affettato successivo
|
-- gestione eventuale scarto affettato successivo
|
||||||
if EMT.VMILL and #EMT.VMILL > 0 then
|
if EMT.VMILL and #EMT.VMILL > 0 then
|
||||||
EMT.SCRAP = nScrapRawId
|
EMT.SCRAP = nScrapRawId
|
||||||
EgtSetStatus( EMT.SCRAP or GDB_ID.NULL, GDB_ST.OFF)
|
if EgtGetInfo( EgtGetCurrMachGroup(), 'Vm', 'b') then
|
||||||
|
EgtSetStatus( EMT.SCRAP or GDB_ID.NULL, GDB_ST.OFF)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
EMT.SCRAP = nil
|
EMT.SCRAP = nil
|
||||||
end
|
end
|
||||||
@@ -608,82 +615,118 @@ function OnSimulToolSelect( dPosA)
|
|||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
function OnSimulToolDeselect( dPrevA)
|
function OnSimulToolDeselect( dPrevA, bLastRise)
|
||||||
-- se utensile corrente è sega a catena, devo depositarla
|
|
||||||
if HeadIsChainSaw( EMT.PREVHEAD_H1) then
|
-- se ToolDeselect chiamata da MLPE, bisogna scaricare ChainSaw perchè è ultimo movimento di rise e poi si cambia utensile
|
||||||
-- visualizzo utensile su TcPos
|
-- o movimento pinze in cui non può esserci ChainSaw in mandrino
|
||||||
ShowToolInTcPos( EMT.PREVTCPOS_H1, true)
|
if dPrevA then
|
||||||
-- nascondo l'utensile sulla testa
|
local nHeadSet = GetHeadSet( EMT.HEAD)
|
||||||
EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H1 or '') or GDB_ID.NULL, GDB_MD.HIDDEN)
|
-- se utensile corrente è sega a catena, devo depositarla
|
||||||
-- se non è chiamata per cambio angolo di presa della sega a catena
|
if nHeadSet == 1 and HeadIsChainSaw( EMT.HEAD) then
|
||||||
local sTool, sHead, sTcPos = FindNextToolOnHeadSet( 1, false)
|
-- visualizzo utensile su TcPos
|
||||||
if not dPrevA or not sTool then
|
ShowToolInTcPos( EMT.PREVTCPOS_H1, true)
|
||||||
|
-- nascondo l'utensile sulla testa
|
||||||
|
EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H1 or '') or GDB_ID.NULL, GDB_MD.HIDDEN)
|
||||||
|
-- si cerca prossimo utensile, se ChainSaw non posso caricarlo, altrimenti preselezione
|
||||||
|
local sTool, sHead, sTcPos, bCarrMove = FindNextToolOnHeadSet( 1, false)
|
||||||
-- imposto correttamente i dati di testa
|
-- imposto correttamente i dati di testa
|
||||||
local OrigEMC = EMC
|
local OrigEMC = EMC
|
||||||
EMC = { HEAD = sHead, TOOL = sTool, TCPOS = sTcPos, TOTDIAM = 0}
|
-- se non precarico utensile allora testa base e T0
|
||||||
|
EMC = { HEAD = sHead or 'H11', TOOL = sTool, TCPOS = sTcPos or 'T0', TOTDIAM = 0}
|
||||||
OnSetHead()
|
OnSetHead()
|
||||||
EMC = OrigEMC
|
EMC = OrigEMC
|
||||||
local dHomeX1 = EgtGetAxisHomePos( 'X1')
|
-- se c'è prossimo utensile, oppure se non c'è e c'è un movimento carrelli
|
||||||
local dHomeC1 = EgtGetAxisHomePos( 'C1')
|
if sTool or ( not sTool and bCarrMove) or not bLastRise then
|
||||||
local dHomeB1 = EgtGetAxisHomePos( 'B1')
|
|
||||||
|
|
||||||
-- cambio utensile
|
local dHomeX1 = EgtGetAxisHomePos( 'X1')
|
||||||
EgtSetAxisPos( 'C1', dHomeC1)
|
local dHomeC1 = EgtGetAxisHomePos( 'C1')
|
||||||
EgtSetAxisPos( 'B1', dHomeB1)
|
local dHomeB1 = EgtGetAxisHomePos( 'B1')
|
||||||
EgtSetAxisPos( 'Z1', MaxZ1)
|
|
||||||
SimulMoveAxis( 'X1', dHomeX1, MCH_SIM_STEP.RAPID)
|
-- cambio utensile
|
||||||
if sTcPos then
|
EgtSetAxisPos( 'C1', dHomeC1)
|
||||||
LoadNextTool( 1, DefTcPos1)
|
EgtSetAxisPos( 'B1', dHomeB1)
|
||||||
|
EgtSetAxisPos( 'Z1', MaxZ1)
|
||||||
|
SimulMoveAxis( 'X1', dHomeX1, MCH_SIM_STEP.RAPID)
|
||||||
|
if sTcPos then
|
||||||
|
LoadNextTool( 1, sTcPos)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
EMT.CHSAW_OUT = nil
|
elseif nHeadSet == 2 and HeadIsChainSaw( EMT.HEAD) then
|
||||||
end
|
-- visualizzo utensile su TcPos
|
||||||
elseif HeadIsChainSaw( EMT.PREVHEAD_H2) then
|
ShowToolInTcPos( EMT.PREVTCPOS_H2, true)
|
||||||
-- visualizzo utensile su TcPos
|
-- nascondo l'utensile sulla testa
|
||||||
ShowToolInTcPos( EMT.PREVTCPOS_H2, true)
|
EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H2 or '') or GDB_ID.NULL, GDB_MD.HIDDEN)
|
||||||
-- nascondo l'utensile sulla testa
|
-- si cerca prossimo utensile, se ChainSaw non posso caricarlo, altrimenti preselezione
|
||||||
EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H2 or '') or GDB_ID.NULL, GDB_MD.HIDDEN)
|
local sTool, sHead, sTcPos, bCarrMove = FindNextToolOnHeadSet( 2, false)
|
||||||
-- se non è chiamata per cambio angolo di presa della sega a catena
|
-- imposto correttamente i dati di testa
|
||||||
local sTool, sHead, sTcPos = FindNextToolOnHeadSet( 2, false)
|
|
||||||
if not dPrevA or not sTool then
|
|
||||||
-- cambio utensile
|
|
||||||
EgtSetAxisPos( 'C2', ParkC2)
|
|
||||||
EgtSetAxisPos( 'B2', ParkB2)
|
|
||||||
EgtSetAxisPos( 'Z2', MaxZ2)
|
|
||||||
SimulMoveAxis( 'X2', ParkX2, MCH_SIM_STEP.RAPID)
|
|
||||||
local OrigEMC = EMC
|
local OrigEMC = EMC
|
||||||
EMC = { HEAD = sHead or 'H21', TOOL = sTool, TCPOS = sTcPos, TOTDIAM = 0}
|
-- se non precarico utensile allora testa base e T0
|
||||||
|
EMC = { HEAD = sHead or 'H21', TOOL = sTool, TCPOS = sTcPos or 'T0', TOTDIAM = 0}
|
||||||
OnSetHead()
|
OnSetHead()
|
||||||
EMC = OrigEMC
|
EMC = OrigEMC
|
||||||
if sTcPos then
|
-- se c'è prossimo utensile, oppure se non c'è e c'è un movimento carrelli
|
||||||
LoadNextTool( 2, DefTcPos2)
|
if sTool or ( not sTool and bCarrMove) or not bLastRise then
|
||||||
|
|
||||||
|
local dHomeX2 = EgtGetAxisHomePos( 'X2')
|
||||||
|
local dHomeC2 = EgtGetAxisHomePos( 'C2')
|
||||||
|
local dHomeB2 = EgtGetAxisHomePos( 'B2')
|
||||||
|
|
||||||
|
-- cambio utensile
|
||||||
|
EgtSetAxisPos( 'C2', dHomeC2)
|
||||||
|
EgtSetAxisPos( 'B2', dHomeB2)
|
||||||
|
EgtSetAxisPos( 'Z2', MaxZ2)
|
||||||
|
SimulMoveAxis( 'X2', dHomeX2, MCH_SIM_STEP.RAPID)
|
||||||
|
if sTcPos then
|
||||||
|
LoadNextTool( 2, sTcPos)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
EMT.CHSAW_OUT = nil
|
|
||||||
end
|
end
|
||||||
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
EMT.CHSAW_OUT = nil
|
||||||
|
|
||||||
-- se utensile non cambia e non è sega a catena, esco
|
-- se utensile non cambia e non è sega a catena, esco
|
||||||
if ( EMT.NEXTTOOL == EMT.PREVTOOL_H1 or EMT.NEXTTOOL == EMT.PREVTOOL_H2) and not HeadIsChainSaw( EMT.NEXTHEAD) then return end
|
if ( EMT.NEXTTOOL == EMT.PREVTOOL_H1 or EMT.NEXTTOOL == EMT.PREVTOOL_H2) and not HeadIsChainSaw( EMT.NEXTHEAD) then return end
|
||||||
|
-- verifico se la lavorazione successiva è in doppio e cerco l'utensile doppio
|
||||||
|
local nNextMchId = EgtGetNextActiveOperation( EMT.MCHID)
|
||||||
|
local nDouType = 0
|
||||||
|
if nNextMchId and EgtSetCurrMachining( nNextMchId) then
|
||||||
|
nDouType = EgtGetValInNotes( EgtGetMachiningParam( MCH_MP.USERNOTES) or '', 'DOUBLE', 'i')
|
||||||
|
end
|
||||||
|
EgtSetCurrMachining( EMT.MCHID)
|
||||||
|
local sDouTool = ''
|
||||||
|
if nDouType == 2 then
|
||||||
|
if EgtTdbSetCurrTool( EMT.NEXTTOOL) then
|
||||||
|
sDouTool = EgtGetValInNotes( EgtTdbGetCurrToolParam( MCH_TP.USERNOTES) or '', 'DOUBLE', 's') or ''
|
||||||
|
end
|
||||||
|
EgtTdbSetCurrTool( EMT.TOOL)
|
||||||
|
end
|
||||||
|
-- se utensile corrente diventa il doppio, esco
|
||||||
|
if EMT.PREVTOOL_H2 == sDouTool then return end
|
||||||
|
|
||||||
-- deposito utensile
|
-- deposito utensile
|
||||||
EgtOutText( 'Tool change in progress...')
|
EgtOutText( 'Tool change in progress...')
|
||||||
-- se prossimo utensile sega a catena, devo mettere in home testa 1 e depositare l'utensile sulla testa 2 o viceversa
|
|
||||||
|
|
||||||
local dHeadSet = GetHeadSet( EMT.PREVHEAD)
|
local nHeadSet = GetHeadSet( EMT.PREVHEAD)
|
||||||
|
|
||||||
-- vado a quota home testa attuale
|
-- vado a quota home testa attuale
|
||||||
if dHeadSet == 1 then
|
if nHeadSet == 1 then
|
||||||
SimulMoveAxes( 'X1', EgtGetAxisHomePos( 'X1'), MCH_SIM_STEP.RAPID, 'Z1', EgtGetAxisHomePos( 'Z1'), MCH_SIM_STEP.RAPID,
|
SimulMoveAxes( 'X1', EgtGetAxisHomePos( 'X1'), MCH_SIM_STEP.RAPID, 'Z1', EgtGetAxisHomePos( 'Z1'), MCH_SIM_STEP.RAPID,
|
||||||
'B1', EgtGetAxisHomePos( 'B1'), MCH_SIM_STEP.COLLROT, 'C1', EgtGetAxisHomePos( 'C1'), MCH_SIM_STEP.COLLROT)
|
'B1', EgtGetAxisHomePos( 'B1'), MCH_SIM_STEP.COLLROT, 'C1', EgtGetAxisHomePos( 'C1'), MCH_SIM_STEP.COLLROT)
|
||||||
elseif dHeadSet == 2 then
|
elseif nHeadSet == 2 then
|
||||||
SimulMoveAxes( 'X2', EgtGetAxisHomePos( 'X2'), MCH_SIM_STEP.RAPID, 'Z2', EgtGetAxisHomePos( 'Z2'), MCH_SIM_STEP.RAPID,
|
SimulMoveAxes( 'X2', EgtGetAxisHomePos( 'X2'), MCH_SIM_STEP.RAPID, 'Z2', EgtGetAxisHomePos( 'Z2'), MCH_SIM_STEP.RAPID,
|
||||||
'B2', EgtGetAxisHomePos( 'B2'), MCH_SIM_STEP.COLLROT, 'C2', EgtGetAxisHomePos( 'C2'), MCH_SIM_STEP.COLLROT)
|
'B2', EgtGetAxisHomePos( 'B2'), MCH_SIM_STEP.COLLROT, 'C2', EgtGetAxisHomePos( 'C2'), MCH_SIM_STEP.COLLROT)
|
||||||
end
|
end
|
||||||
|
|
||||||
if dHeadSet == 1 then
|
local nNextHeadSet = GetHeadSet( EMT.NEXTHEAD)
|
||||||
|
|
||||||
|
if nNextHeadSet == 1 then
|
||||||
-- visualizzo utensile su TcPos
|
-- visualizzo utensile su TcPos
|
||||||
ShowToolInTcPos( EMT.PREVTCPOS_H1, true)
|
ShowToolInTcPos( EMT.PREVTCPOS_H1, true)
|
||||||
-- nascondo l'utensile sulla testa
|
-- nascondo l'utensile sulla testa
|
||||||
EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H1 or '') or GDB_ID.NULL, GDB_MD.HIDDEN)
|
EgtSetMode( EgtGetHeadId( EMT.PREVHEAD_H1 or '') or GDB_ID.NULL, GDB_MD.HIDDEN)
|
||||||
else
|
elseif nNextHeadSet == 2 then
|
||||||
-- visualizzo utensile su TcPos
|
-- visualizzo utensile su TcPos
|
||||||
ShowToolInTcPos( EMT.PREVTCPOS_H2, true)
|
ShowToolInTcPos( EMT.PREVTCPOS_H2, true)
|
||||||
-- nascondo l'utensile sulla testa
|
-- nascondo l'utensile sulla testa
|
||||||
@@ -1218,7 +1261,7 @@ function OnSimulMoveEnd()
|
|||||||
local bLastRise = EgtGetInfo( EMT.MOVEID, 'LastRise', 'b')
|
local bLastRise = EgtGetInfo( EMT.MOVEID, 'LastRise', 'b')
|
||||||
-- se ultimo rapido e motosega, si va in home
|
-- se ultimo rapido e motosega, si va in home
|
||||||
if bLastRise and HeadIsChainSaw( EMT.HEAD) then
|
if bLastRise and HeadIsChainSaw( EMT.HEAD) then
|
||||||
OnSimulToolDeselect( EMT.R3)
|
OnSimulToolDeselect( EMT.R3, true)
|
||||||
EMT.CHSAW_OUT = true
|
EMT.CHSAW_OUT = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1427,6 +1470,13 @@ end
|
|||||||
function ExecMoveHome( bNearV)
|
function ExecMoveHome( bNearV)
|
||||||
-- se richiesto, avvicino i rulli
|
-- se richiesto, avvicino i rulli
|
||||||
if bNearV then
|
if bNearV then
|
||||||
|
-- se ho motosega, devo scaricare
|
||||||
|
if HeadIsChainSaw( EMT.HEAD) then
|
||||||
|
-- recupero il valore dell'asse virtuale bloccato A
|
||||||
|
local dPosA = GetCurrChainSawingVirtualAxis()
|
||||||
|
OnSimulToolDeselect( dPosA)
|
||||||
|
EMT.CHSAW_OUT = true
|
||||||
|
end
|
||||||
-- sistemo i rulli
|
-- sistemo i rulli
|
||||||
ExecOpenRoller( 1)
|
ExecOpenRoller( 1)
|
||||||
ExecOpenRoller( 2)
|
ExecOpenRoller( 2)
|
||||||
@@ -1441,6 +1491,8 @@ end
|
|||||||
function ExecUnloading()
|
function ExecUnloading()
|
||||||
if EMT.VMILL and #EMT.VMILL > 0 then
|
if EMT.VMILL and #EMT.VMILL > 0 then
|
||||||
local vMillId = EMT.VMILL[1]
|
local vMillId = EMT.VMILL[1]
|
||||||
|
-- grezzo di appartenenza
|
||||||
|
local nPartRawId = EgtGetParent( vMillId)
|
||||||
-- gruppo dei Vmill
|
-- gruppo dei Vmill
|
||||||
local nVmGrpId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'VMill')
|
local nVmGrpId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'VMill')
|
||||||
-- li sposto per lasciare spazio al nuovo pezzo
|
-- li sposto per lasciare spazio al nuovo pezzo
|
||||||
@@ -1464,6 +1516,7 @@ function ExecUnloading()
|
|||||||
EgtSetAxisPos( 'PW', MaxWOpen)
|
EgtSetAxisPos( 'PW', MaxWOpen)
|
||||||
end
|
end
|
||||||
EgtMove( nLayId, vtMove, GDB_RT.GLOB)
|
EgtMove( nLayId, vtMove, GDB_RT.GLOB)
|
||||||
|
EgtSetStatus( vMillId, GDB_ST.ON)
|
||||||
EgtSetLevel( vMillId, GDB_LV.USER)
|
EgtSetLevel( vMillId, GDB_LV.USER)
|
||||||
-- aggiungo gli spigoli
|
-- aggiungo gli spigoli
|
||||||
if EgtVolZmapSetShowEdges then
|
if EgtVolZmapSetShowEdges then
|
||||||
@@ -1482,6 +1535,12 @@ function ExecUnloading()
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
-- se finito
|
-- se finito
|
||||||
if EMT.PHASE == EgtGetPhaseCount() then
|
if EMT.PHASE == EgtGetPhaseCount() then
|
||||||
|
-- in ogni caso, nascondo ultimo pezzo
|
||||||
|
local nId = EgtGetFirstInGroup( nPartRawId)
|
||||||
|
while nId do
|
||||||
|
EgtSetStatus( nId, GDB_ST.OFF)
|
||||||
|
nId = EgtGetNext( nId)
|
||||||
|
end
|
||||||
-- se impostato di salvare i Vmill, lo faccio
|
-- se impostato di salvare i Vmill, lo faccio
|
||||||
local sMachIni = EgtGetCurrMachineDir() .. '\\' .. EgtGetCurrMachineName() .. '.ini'
|
local sMachIni = EgtGetCurrMachineDir() .. '\\' .. EgtGetCurrMachineName() .. '.ini'
|
||||||
if EgtGetStringFromIni( 'VMill', 'Save', '', sMachIni) == '1' then
|
if EgtGetStringFromIni( 'VMill', 'Save', '', sMachIni) == '1' then
|
||||||
@@ -2614,7 +2673,7 @@ function FindNextToolOnHeadSet( nHSet, bFirst)
|
|||||||
local CurrMachId = EgtGetCurrMachining()
|
local CurrMachId = EgtGetCurrMachining()
|
||||||
local CurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
|
local CurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
|
||||||
-- cerco lavorazione con utensile su gruppo testa indicato
|
-- cerco lavorazione con utensile su gruppo testa indicato
|
||||||
local sTool, sHead, sTcPos
|
local sTool, sHead, sTcPos, bCarrMove
|
||||||
local OpId
|
local OpId
|
||||||
if bFirst then
|
if bFirst then
|
||||||
OpId = EgtGetFirstActiveOperation()
|
OpId = EgtGetFirstActiveOperation()
|
||||||
@@ -2627,12 +2686,20 @@ function FindNextToolOnHeadSet( nHSet, bFirst)
|
|||||||
if EgtSetCurrMachining( OpId) then
|
if EgtSetCurrMachining( OpId) then
|
||||||
local sNextTool = EgtGetMachiningParam( MCH_MP.TOOL)
|
local sNextTool = EgtGetMachiningParam( MCH_MP.TOOL)
|
||||||
if EgtTdbSetCurrTool( sNextTool) then
|
if EgtTdbSetCurrTool( sNextTool) then
|
||||||
|
local nClId = EgtGetFirstNameInGroup( OpId, 'CL') -- recupero Id del gruppo CL della lavorazione corrente
|
||||||
|
local nPathId = EgtGetFirstInGroup( nClId or GDB_ID.NULL) -- Id del primo gruppo nella lavorazione (P1)
|
||||||
|
local dAuxMoveCount = EgtGetInfo( nPathId, 'AS#', 'd') or 0 -- numero di movimenti ausiliari
|
||||||
|
if dAuxMoveCount > 3 then
|
||||||
|
bCarrMove = true
|
||||||
|
end
|
||||||
local sNextHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
local sNextHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
|
||||||
if GetHeadSet( sNextHead) == nHSet and EMT.TOOL ~= sNextTool then
|
if GetHeadSet( sNextHead) == nHSet then
|
||||||
if not HeadIsChainSaw( sNextHead) then
|
if CurrTool ~= sNextTool then
|
||||||
sHead = sNextHead
|
if not HeadIsChainSaw( sNextHead) then
|
||||||
sTool = sNextTool
|
sHead = sNextHead
|
||||||
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
|
sTool = sNextTool
|
||||||
|
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
@@ -2641,11 +2708,15 @@ function FindNextToolOnHeadSet( nHSet, bFirst)
|
|||||||
end
|
end
|
||||||
OpId = EgtGetNextActiveOperation( OpId)
|
OpId = EgtGetNextActiveOperation( OpId)
|
||||||
end
|
end
|
||||||
|
-- se non c'è un operazione, significa che è fine pezzo, quindi si forza movimento carrelli perchè avverrà uno scarico
|
||||||
|
if not OpId then
|
||||||
|
bCarrMove = true
|
||||||
|
end
|
||||||
-- ripristino stato iniziale
|
-- ripristino stato iniziale
|
||||||
EgtSetCurrMachining( CurrMachId or GDB_ID.NULL)
|
EgtSetCurrMachining( CurrMachId or GDB_ID.NULL)
|
||||||
EgtTdbSetCurrTool( CurrTool or '')
|
EgtTdbSetCurrTool( CurrTool or '')
|
||||||
-- restituisco risultato
|
-- restituisco risultato
|
||||||
return sTool, sHead, sTcPos
|
return sTool, sHead, sTcPos, bCarrMove
|
||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
|
|||||||
+33
-43
@@ -279,11 +279,10 @@ function OnSpecialLink()
|
|||||||
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2p, EMC.L3p, EMC.R1p, EMC.R2p, EMC.R3}, 30, 2, 2, 'FirstClimb=1;')
|
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2p, EMC.L3p, EMC.R1p, EMC.R2p, EMC.R3}, 30, 2, 2, 'FirstClimb=1;')
|
||||||
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2p, EMC.R3}, 30, 2, 2)
|
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2p, EMC.R3}, 30, 2, 2)
|
||||||
if abs( EMC.R3) < 0.1 then
|
if abs( EMC.R3) < 0.1 then
|
||||||
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, ParkCSaw0Z1, EMC.R1, EMC.R2, EMC.R3}, 30, 2, 2)
|
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, ParkCSaw0Z1, EMC.R1, EMC.R2, EMC.R3}, 31, 2, 2, 'LastClimb=1;')
|
||||||
else
|
else
|
||||||
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2, EMC.R3}, 30, 2, 2)
|
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2, EMC.R3}, 31, 2, 2, 'LastClimb=1;')
|
||||||
end
|
end
|
||||||
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2, EMC.R3}, 31, 2, 2, 'LastClimb=1;')
|
|
||||||
|
|
||||||
-- se fine lavorazione con deposito utensile
|
-- se fine lavorazione con deposito utensile
|
||||||
elseif EMC.LINKTYPE == 2 then
|
elseif EMC.LINKTYPE == 2 then
|
||||||
@@ -400,9 +399,12 @@ function OnSpecialLink()
|
|||||||
EmtRemoveClimb( EMC.NEXTMCHID, EMC.NEXTMAIN)
|
EmtRemoveClimb( EMC.NEXTMCHID, EMC.NEXTMAIN)
|
||||||
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2p, EMC.L3p, EMC.R1p, EMC.R2p}, 30, 2, 2, 'FirstClimb=1;')
|
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2p, EMC.L3p, EMC.R1p, EMC.R2p}, 30, 2, 2, 'FirstClimb=1;')
|
||||||
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, EMC.R2p}, 30, 2, 2)
|
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, EMC.R2p}, 30, 2, 2)
|
||||||
-- se assi cambiano di molto
|
-- se asse B cambia di molto
|
||||||
if abs( EMC.R1 - EMC.R1p) > 10 or abs( EMC.R2 - EMC.R2p) > 90 then
|
if abs( 0 - EMC.R2p) > 1 then
|
||||||
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, 0}, 30, 2, 2)
|
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1p, 0}, 30, 2, 2)
|
||||||
|
end
|
||||||
|
-- se assi cambiano di molto
|
||||||
|
if abs( EMC.R1 - EMC.R1p) > 10 then
|
||||||
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, 0}, 30, 2, 2)
|
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, 0}, 30, 2, 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -417,7 +419,10 @@ function OnSpecialLink()
|
|||||||
EmtRemoveRise( EMC.PREVMCHID, EMC.PREVMAIN)
|
EmtRemoveRise( EMC.PREVMCHID, EMC.PREVMAIN)
|
||||||
if abs( EMC.R1 - EMC.R1p) > 1 or abs( EMC.R2 - EMC.R2p) > 1 then
|
if abs( EMC.R1 - EMC.R1p) > 1 or abs( EMC.R2 - EMC.R2p) > 1 then
|
||||||
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1p, 0}, 30, 3, 2, EgtIf( bSplit, 'Split=1;', '')..'FirstRise=1;')
|
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1p, 0}, 30, 3, 2, EgtIf( bSplit, 'Split=1;', '')..'FirstRise=1;')
|
||||||
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1, 0}, 30, 3, 2)
|
-- se assi cambiano di molto
|
||||||
|
if abs( EMC.R1 - EMC.R1p) > 10 then
|
||||||
|
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1, 0}, 30, 3, 2)
|
||||||
|
end
|
||||||
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1, EMC.R2}, 30, 3, 2)
|
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1, EMC.R2}, 30, 3, 2)
|
||||||
else
|
else
|
||||||
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1p, EMC.R2p}, 30, 3, 2, EgtIf( bSplit, 'Split=1;', '')..'FirstRise=1;')
|
EmtAddRise( EMC.PREVMCHID, EMC.PREVMAIN, { EMC.L1p, EMC.L2p, EMC.L3, EMC.R1p, EMC.R2p}, 30, 3, 2, EgtIf( bSplit, 'Split=1;', '')..'FirstRise=1;')
|
||||||
@@ -455,6 +460,7 @@ function OnSpecialLink()
|
|||||||
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 30, 2, 2, 'LastClimb=1;')
|
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2}, 30, 2, 2, 'LastClimb=1;')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- se sega a catena su testa 2
|
-- se sega a catena su testa 2
|
||||||
elseif EMC.HEAD == 'H23' then
|
elseif EMC.HEAD == 'H23' then
|
||||||
-- recupero se split da note utente di lavorazione precedente
|
-- recupero se split da note utente di lavorazione precedente
|
||||||
@@ -466,11 +472,10 @@ function OnSpecialLink()
|
|||||||
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2p, EMC.L3p, EMC.R1p, EMC.R2p, EMC.R3}, 30, 2, 2, 'FirstClimb=1;')
|
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2p, EMC.L3p, EMC.R1p, EMC.R2p, EMC.R3}, 30, 2, 2, 'FirstClimb=1;')
|
||||||
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2p, EMC.R3}, 30, 2, 2)
|
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2p, EMC.R3}, 30, 2, 2)
|
||||||
if abs( EMC.R3) < 0.1 then
|
if abs( EMC.R3) < 0.1 then
|
||||||
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, ParkCSaw0Z2, EMC.R1, EMC.R2, EMC.R3}, 30, 2, 2)
|
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, ParkCSaw0Z2, EMC.R1, EMC.R2, EMC.R3}, 31, 2, 2, 'LastClimb=1;')
|
||||||
else
|
else
|
||||||
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2, EMC.R3}, 30, 2, 2)
|
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3p, EMC.R1, EMC.R2, EMC.R3}, 31, 2, 2, 'LastClimb=1;')
|
||||||
end
|
end
|
||||||
EmtAddClimb( EMC.NEXTMCHID, EMC.NEXTMAIN, { EMC.L1, EMC.L2, EMC.L3, EMC.R1, EMC.R2, EMC.R3}, 31, 2, 2, 'LastClimb=1;')
|
|
||||||
|
|
||||||
-- se fine lavorazione con deposito utensile
|
-- se fine lavorazione con deposito utensile
|
||||||
elseif EMC.LINKTYPE == 2 then
|
elseif EMC.LINKTYPE == 2 then
|
||||||
@@ -522,36 +527,6 @@ local function PrepareClGroup( nParentId)
|
|||||||
return nClId
|
return nClId
|
||||||
end
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
local function IsStartOrRestPhase( nPhase)
|
|
||||||
local sVal = EgtGetInfo( EgtGetPhaseDisposition( nPhase) or GDB_ID.NULL, 'TYPE')
|
|
||||||
return ( sVal == 'START' or sVal == 'REST')
|
|
||||||
end
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
local function IsMidPhase( nPhase)
|
|
||||||
local sVal = EgtGetInfo( EgtGetPhaseDisposition( nPhase) or GDB_ID.NULL, 'TYPE')
|
|
||||||
return ( sVal == 'MID')
|
|
||||||
end
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
local function IsEndPhase( nPhase)
|
|
||||||
local sVal = EgtGetInfo( EgtGetPhaseDisposition( nPhase) or GDB_ID.NULL, 'TYPE')
|
|
||||||
return ( sVal == 'END')
|
|
||||||
end
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
local function IsMid2Phase( nPhase)
|
|
||||||
local sVal = EgtGetInfo( EgtGetPhaseDisposition( nPhase) or GDB_ID.NULL, 'TYPE')
|
|
||||||
return ( sVal == 'MID2')
|
|
||||||
end
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
|
||||||
local function IsEnd2Phase( nPhase)
|
|
||||||
local sVal = EgtGetInfo( EgtGetPhaseDisposition( nPhase) or GDB_ID.NULL, 'TYPE')
|
|
||||||
return ( sVal == 'END2')
|
|
||||||
end
|
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
local function GetNextStartOrRestPhase( nPhase)
|
local function GetNextStartOrRestPhase( nPhase)
|
||||||
local nNextPhase = nPhase + 1
|
local nNextPhase = nPhase + 1
|
||||||
@@ -580,6 +555,14 @@ local function IsFirstMachiningOfStart( nMchId)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---------------------------------------------------------------------
|
||||||
|
--TODO : controllare più precisamente se il primo punto della lavorazione fa collidere utensile, codolo, B o C contro la trave se non arretrata prima della discesa in Z.
|
||||||
|
-- ora fa arretrare la trave anche per le lavorazioni che non collidono ma semplicemente iniziano più avanti della trave, anche se lavorazioni sul fianco.
|
||||||
|
local function IsHeadMachining( nMchId)
|
||||||
|
local vInitAx = EmtGetInitialAxesPos( nMchId)
|
||||||
|
return ( vInitAx and vInitAx[1] > 100 * GEO.EPS_SMALL)
|
||||||
|
end
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
local function GetPhaseRot( nPhase)
|
local function GetPhaseRot( nPhase)
|
||||||
return ( EgtGetInfo( EgtGetPhaseDisposition( nPhase) or GDB_ID.NULL, 'ROT', 'i') or 0)
|
return ( EgtGetInfo( EgtGetPhaseDisposition( nPhase) or GDB_ID.NULL, 'ROT', 'i') or 0)
|
||||||
@@ -1282,13 +1265,20 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload, bPreR
|
|||||||
elseif not IsEndPhase( EMC.PHASE) then
|
elseif not IsEndPhase( EMC.PHASE) then
|
||||||
local vCmd = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar, AuxInfoMach)
|
local vCmd = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar, AuxInfoMach)
|
||||||
-- se fase iniziale e ci sono stati movimenti di carrelli
|
-- se fase iniziale e ci sono stati movimenti di carrelli
|
||||||
if IsStartPhase( EMC.PHASE) and #vCmd > 0 and IsFirstMachiningOfStart( EMC.MCHID) and
|
if ( IsStartPhase( EMC.PHASE) or IsEnd2Phase( EMC.PHASE)) and #vCmd > 0 and IsHeadMachining( EMC.MCHID) and
|
||||||
not bPreSplit and not bSplitting and not bPreCut and not bCutting then
|
not bPreSplit and not bSplitting and not bPreCut and not bCutting then
|
||||||
|
-- recupero posizione testa trave
|
||||||
local dLastTPos, dLastY1Delta = GetLastTPos( vCmd)
|
local dLastTPos, dLastY1Delta = GetLastTPos( vCmd)
|
||||||
-- se testa oltre lo zero
|
if not dLastTPos then dLastTPos = EMC.TPOS end
|
||||||
|
if not dLastY1Delta then dLastY1Delta = EMC.Y1DELTA end
|
||||||
|
-- TODO : individuare condizione più corretta nella quale arretrare la testa della trave
|
||||||
|
-- se testa oltre lo zero e entro le corse assi con 5 mm di sicurezza
|
||||||
if dLastTPos and dLastTPos < 0 then
|
if dLastTPos and dLastTPos < 0 then
|
||||||
-- si sposta testa in posizione carico
|
-- si sposta testa in posizione di parcheggio rulli (o quanto si può)
|
||||||
table.insert( vCmd, { 24, 'T', ParkV1, 'Y1', ParkV1 + dLastY1Delta})
|
local dNewTPos = min( ParkV1, MaxY1 - dLastY1Delta - 5)
|
||||||
|
if dNewTPos > 0 then
|
||||||
|
table.insert( vCmd, { 24, 'T', dNewTPos, 'Y1', dNewTPos + dLastY1Delta})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
-- Se non ci sono spostamenti, confermo i parametri di aggancio e di posizione roller
|
-- Se non ci sono spostamenti, confermo i parametri di aggancio e di posizione roller
|
||||||
elseif SpecTestOnlyRemarkInCmds( vCmd) then
|
elseif SpecTestOnlyRemarkInCmds( vCmd) then
|
||||||
|
|||||||
@@ -1,5 +1,25 @@
|
|||||||
==== Common_ONE-PF Update Log ====
|
==== Common_ONE-PF Update Log ====
|
||||||
|
|
||||||
|
Versione 3.1-- (--/--/2026)
|
||||||
|
- (SIM-INI) Con CAM5 v.3.1h2 è possibile abilitare/disabilitare VMILL durante lavorazione. Serve Modifica INI macchina "Enable=2" in sezione "[VMill]".
|
||||||
|
Il flag non è più di creazione, ma di visualizzazione, e il controllo collisioni è comunque garantito.
|
||||||
|
|
||||||
|
Versione 3.1h1 (05/08/2026)
|
||||||
|
- (SIM-GEN) Se arretra trave al parcheggio rulli dopo Unload non può eseguire movimento completo, esegue movimento parziale solo se questo porta POST > 0. Altrimenti non fa nulla. Ticket#3102
|
||||||
|
- (SIM) OnSimulToolDeselect chiamata da mlpe e ultimo movimento o movimento pinze nel quale non bisogna caricare nessun utensile, forzo TCPOS a 'T0'. Ticket#3114
|
||||||
|
- (SIM) Corretta simulazione utensile già caricato che diventa utensile che lavora in doppio. Ticket#3105
|
||||||
|
- (SIM-GEN) Cmd 24 (arretro trave in parcheggio rulli) anche se è fase END2, tolto controllo se è prima lavorazione e inserito controllo se è lavorazione di testa. Ticket#3089
|
||||||
|
- (GEN) Aggiunta gestione Cmd 24 (arretro trave in parcheggio rulli) come se fosse Cmd 2 (come in simulazione). Ticket#3089
|
||||||
|
|
||||||
|
Versione 3.1g3 (24/07/2026)
|
||||||
|
- (SIM) Non si legge il nome utensile da tabella EMT, ma si utilizza quello corrente salvato in precedenza
|
||||||
|
- (SIM) Corretta gestione scarico motosega in caso di cambio pinze dopo che utensile già caricato. In generazione era corretto perchè selezione utensile avviene già dopo posizionamento carrelli
|
||||||
|
- (SIM-GEN) Migliorati movimenti lama e motosega. Ultimo punto climb motosega è in alto in quota parcheggio.
|
||||||
|
- (GEN) Corretta scrittura piano lavorazione in caso di rotazione con pezzo con sovramateriale in testa. Ticket#3092
|
||||||
|
|
||||||
|
Versione 3.1g2 (07/07/2026)
|
||||||
|
- (SIM) Corretta gestione cambio utensile con motosega
|
||||||
|
|
||||||
Versione 3.1g1 (07/07/2026)
|
Versione 3.1g1 (07/07/2026)
|
||||||
- (ALL) Prima versione con gestione nuovi link (no tastatore)
|
- (ALL) Prima versione con gestione nuovi link (no tastatore)
|
||||||
- Gestione lavorazioni in doppio
|
- Gestione lavorazioni in doppio
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
local InfoCommon_STD_PP = {
|
local InfoCommon_STD_PP = {
|
||||||
NAME = 'Common_ONE-PF', -- nome script PP standard
|
NAME = 'Common_ONE-PF', -- nome script PP standard
|
||||||
VERSION = '3.1g1', -- versione script
|
VERSION = '3.1--', -- versione script
|
||||||
MIN_MACH_VER_PP_COMMON = '3.1f1' -- versione minima kernel
|
MIN_MACH_VER_PP_COMMON = '3.1f1' -- versione minima kernel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user