Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 77cf0826d5 | |||
| 996185e332 | |||
| ec0e8b479a | |||
| c06e5c334e | |||
| 185a3d8338 | |||
| 38ea77dfad | |||
| 70e8556c69 | |||
| 4ab2a89f2d | |||
| 6ad7cf16c4 | |||
| 57a557ec16 | |||
| dfdce8b00d | |||
| d486d48a49 | |||
| 5d2bac29ce | |||
| 707eb81248 | |||
| c64d5666f0 | |||
| 11c3e0c3e5 | |||
| a7824bf0c8 | |||
| 0f036d5be5 |
+3
-1
@@ -110,7 +110,7 @@ if EgtExistsFile( sDataBeam) then
|
||||
BeamData.LEN_VERY_SHORT_PART = Machine.Offsets.LEN_VERY_SHORT_PART or BeamData.LEN_VERY_SHORT_PART
|
||||
BeamData.LEN_SHORT_PART = Machine.Offsets.LEN_SHORT_PART or BeamData.LEN_SHORT_PART
|
||||
BeamData.OVM_MID = Machine.Offsets.OVM_MID or BeamData.OVM_MID
|
||||
BeamData.MAX_ANGLE_DRILL_CUT = Machine.Offsets.MAX_ANGLE_DRILL_CUT or BeamData.MAX_ANGLE_DRILL_CUT
|
||||
if Machine.Offsets.MAX_ANGLE_DRILL_CUT then BeamData.MAX_ANGLE_DRILL_CUT = EgtClamp( Machine.Offsets.MAX_ANGLE_DRILL_CUT, 1, 89) end
|
||||
if Machine.Offsets.PRECUT_HEAD_DISABLE then BeamData.PRECUT_HEAD = ( Machine.Offsets.PRECUT_HEAD_DISABLE == 0) end
|
||||
if Machine.Offsets.PRECUT_TAIL_DISABLE then BeamData.PRECUT_TAIL = ( Machine.Offsets.PRECUT_TAIL_DISABLE == 0) end
|
||||
-- per tagli con lama longitudinale si può attivare oppure si prende in automatico in caso di presenza della seconda lama
|
||||
@@ -118,6 +118,8 @@ if EgtExistsFile( sDataBeam) then
|
||||
BeamData.USE_LONGCUT = SecondSaw or BeamData.USE_LONGCUT
|
||||
if Machine.Offsets.CUT_SIC then BeamData.CUT_SIC = EgtClamp( Machine.Offsets.CUT_SIC, 15, 50) end
|
||||
if Machine.Offsets.USE_PART_OFFSET then BeamData.USE_PART_OFFSET = ( Machine.Offsets.USE_PART_OFFSET == 1) end
|
||||
if Machine.Offsets.MIN_JOIN_S then BeamData.MIN_JOIN_S = Machine.Offsets.MIN_JOIN_S end
|
||||
if Machine.Offsets.MIN_JOIN_L then BeamData.MIN_JOIN_L = Machine.Offsets.MIN_JOIN_L end
|
||||
end
|
||||
if Machine.Trave then
|
||||
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
|
||||
|
||||
+55
-7
@@ -311,6 +311,7 @@ function OnDispositionEnd()
|
||||
end
|
||||
end
|
||||
if #EMT.MDCHAR > 0 then
|
||||
EMT.LASTOISBRAKE = nil
|
||||
local nMoveType = EgtIf( EMT.CHY_ON, 3, 2)
|
||||
EmitMoveStartChars( nMoveType)
|
||||
-- se dopo c'è scarico spezzone devo mettere attesa termine esecuzione
|
||||
@@ -319,6 +320,7 @@ function OnDispositionEnd()
|
||||
else
|
||||
EmitMoveWaitChars( nMoveType, true)
|
||||
end
|
||||
|
||||
-- emissione conclusione pezzo precedente (se non in modalità test)
|
||||
if not TEST_USE and EMT.PRODID then
|
||||
local sEnd= 'M113 P1='..tostring( EMT.PRODID)..' P2='..tostring( EMT.PATTID)..' P3='..tostring( EMT.CUTID)..' P4=2'
|
||||
@@ -571,6 +573,11 @@ function OnMachiningEnd()
|
||||
end
|
||||
EMT.FALL = nil
|
||||
elseif not EMT.PREROT then
|
||||
-- emissione conclusione pezzo (se non in modalità test)
|
||||
if not TEST_USE and EMT.PRODID and ( EMT.UNLOAD and ( not nNextPathId) and ( not nNextMchId)) then
|
||||
local sEnd= 'M113 P1='..tostring( EMT.PRODID)..' P2='..tostring( EMT.PATTID)..' P3='..tostring( EMT.CUTID)..' P4=2'
|
||||
MyOutput( sEnd)
|
||||
end
|
||||
MyOutput( 'M77')
|
||||
end
|
||||
end
|
||||
@@ -605,6 +612,9 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function OnPathStart()
|
||||
if EMT.OPEISDISP then
|
||||
return
|
||||
end
|
||||
-- non ancora iniziata la lavorazione
|
||||
EMT.MCHFIRST = true
|
||||
EMT.MCHFIRSTFEED = true
|
||||
@@ -634,6 +644,9 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function OnPathEnd()
|
||||
if EMT.OPEISDISP then
|
||||
return
|
||||
end
|
||||
if not EMT.ZMAX then
|
||||
EmitResetMachining()
|
||||
end
|
||||
@@ -2007,8 +2020,15 @@ function PrepareResidue( sCmd, nInd)
|
||||
if EMT.UNL2 then
|
||||
MDChar.V1 = ParkV1 ; EMT.V1POS = MDChar.V1
|
||||
MDChar.V2 = ParkV2 ; EMT.V2POS = MDChar.V2
|
||||
MDChar.BeamVise = 0
|
||||
end
|
||||
table.insert( EMT.MDCHAR, MDChar)
|
||||
-- Se scarico in linea con abbassamento piano ferma pezzo allo scarico
|
||||
if Cmd[4] == 'UnBrakeBeam' then
|
||||
-- Abbassa ferma pezzo
|
||||
local MDStopBeam = { StopBeamStat=2, Load=1}
|
||||
table.insert( EMT.MDCHAR, MDStopBeam)
|
||||
end
|
||||
end
|
||||
elseif Cmd[1] == '2' then
|
||||
local MDChar = { IniStatY1=EMT.ISY1, FinStatY1=EMT.FSY1, IniStatY2=EMT.ISY2, FinStatY2=EMT.FSY2, IniStatV2=1, BeamVise=EMT.BV}
|
||||
@@ -2020,6 +2040,11 @@ function PrepareResidue( sCmd, nInd)
|
||||
EMT.ROLL_IN = nil
|
||||
end
|
||||
table.insert( EMT.MDCHAR, MDChar)
|
||||
-- Alza ferma pezzo
|
||||
if Cmd[6] == 'BrakeBeam' then
|
||||
local MDStopBeam = { StopBeamStat=1, Load=1}
|
||||
table.insert( EMT.MDCHAR, MDStopBeam)
|
||||
end
|
||||
elseif Cmd[1] == '3' then
|
||||
local MDChar = { IniStatY1=EMT.ISY1, FinStatY1=EMT.FSY1, IniStatY2=EMT.ISY2, FinStatY2=EMT.FSY2, IniStatV1=1, IniStatV2=1, BeamVise=EMT.BV}
|
||||
if Cmd[2] ~= 'T' then MDChar[Cmd[2]] = tonumber( Cmd[3]) end
|
||||
@@ -2107,12 +2132,15 @@ function PrepareUnload( sCmd, nInd)
|
||||
local bBarOnY = ( EMT.PHASE < EgtGetPhaseCount() and not IsEnd2Phase( EMT.PHASE))
|
||||
-- Se scarico in linea con abbassamento piano ferma pezzo allo scarico
|
||||
if Cmd[4] == 'UnBrakeBeam' then
|
||||
-- Muove carrello aperto e lo chiude
|
||||
local MDChar = { Y2=tonumber(Cmd[3]), V2=ParkV2, IniStatY2=1, FinStatY2=-1, BeamVise=EgtIf( bBarOnY, 1, 0), MovType=EgtIf( EMT.CHY_ON, 3, 2)}
|
||||
-- Muove carrello aperto e lo mantiene aperto
|
||||
local MDChar = { Y2=tonumber(Cmd[3]), V2=ParkV2, IniStatY2=1, FinStatY2=1, BeamVise=EgtIf( bBarOnY, 1, 0), MovType=EgtIf( EMT.CHY_ON, 3, 2)}
|
||||
table.insert( EMT.MDCHAR, MDChar)
|
||||
-- Abbassa ferma pezzo
|
||||
local MDStopBeam = { StopBeamStat=2}
|
||||
local MDStopBeam = { StopBeamStat=2, Unload=1}
|
||||
table.insert( EMT.MDCHAR, MDStopBeam)
|
||||
-- Dopo che si è abbassato il ferma pezzo chiude il pezzo in morsa per evitare che esso possa essere pinzato inclinato dal pistone
|
||||
MDChar = { Y2=tonumber(Cmd[3]), V2=ParkV2, IniStatY2=1, FinStatY2=-1, BeamVise=EgtIf( bBarOnY, 1, 0), MovType=EgtIf( EMT.CHY_ON, 3, 2)}
|
||||
table.insert( EMT.MDCHAR, MDChar)
|
||||
-- Se non è ultima fase e non è fase successiva a scarico su carico c'è una barra sulla pinza Y1
|
||||
else
|
||||
local nFinStatY2 = EgtIf( Cmd[4] == 'NoWaitUnload', -84, -1)
|
||||
@@ -2129,7 +2157,7 @@ function PrepareUnload( sCmd, nInd)
|
||||
local MDChar = { Y2=tonumber(Cmd[5]), IniStatY1=EgtIf( bBarOnY, -1, 1), FinStatY1=EgtIf( bBarOnY, -1, 1), IniStatY2=-1, FinStatY2=-1, IniStatV2=1, BeamVise=2, MovType=EgtIf( EMT.CHY_ON, 3, 2)}
|
||||
table.insert( EMT.MDCHAR, MDChar)
|
||||
-- Alza ferma pezzo
|
||||
local MDStopBeam = { StopBeamStat=1}
|
||||
local MDStopBeam = { StopBeamStat=1, Unload=1}
|
||||
table.insert( EMT.MDCHAR, MDStopBeam)
|
||||
-- Ribadisce le quote del carrello appena mosso e Apre la pinza
|
||||
MDChar = { Y2=tonumber(Cmd[5]), IniStatY1=EgtIf( bBarOnY, -1, 1), FinStatY1=EgtIf( bBarOnY, -1, 1), IniStatY2=-1, FinStatY2=1, IniStatV2=1, BeamVise=2, MovType=EgtIf( EMT.CHY_ON, 3, 2)}
|
||||
@@ -2189,6 +2217,12 @@ function PreparePreRotation( sCmd, nInd)
|
||||
MDChar = { [Cmd[2]]=tonumber(Cmd[3]), IniStatY1=86, FinStatY1=87, IniStatY2=1, BeamVise=0}
|
||||
end
|
||||
table.insert( EMT.MDCHAR, MDChar)
|
||||
-- Se scarico in linea con abbassamento piano ferma pezzo allo scarico
|
||||
if Cmd[4] == 'UnBrakeBeam' then
|
||||
-- Abbassa ferma pezzo
|
||||
local MDStopBeam = { StopBeamStat=2, Load=1}
|
||||
table.insert( EMT.MDCHAR, MDStopBeam)
|
||||
end
|
||||
end
|
||||
elseif Cmd[1] == '2' then
|
||||
local MDChar = { IniStatY1=EMT.ISY1, FinStatY1=EMT.FSY1, IniStatY2=EMT.ISY2, FinStatY2=EMT.FSY2, IniStatV2=1, BeamVise=EMT.BV}
|
||||
@@ -2200,6 +2234,11 @@ function PreparePreRotation( sCmd, nInd)
|
||||
EMT.ROLL_IN = nil
|
||||
end
|
||||
table.insert( EMT.MDCHAR, MDChar)
|
||||
-- Alza ferma pezzo
|
||||
if Cmd[6] == 'BrakeBeam' then
|
||||
local MDStopBeam = { StopBeamStat=1, Load=1}
|
||||
table.insert( EMT.MDCHAR, MDStopBeam)
|
||||
end
|
||||
elseif Cmd[1] == '3' then
|
||||
local MDChar = { IniStatY1=EMT.ISY1, FinStatY1=EMT.FSY1, IniStatY2=EMT.ISY2, FinStatY2=EMT.FSY2, IniStatV1=1, IniStatV2=1, BeamVise=EMT.BV}
|
||||
if Cmd[2] ~= 'T' then MDChar[Cmd[2]] = tonumber( Cmd[3]) end
|
||||
@@ -3110,10 +3149,19 @@ end
|
||||
---------------------------------------------------------------------
|
||||
-- Emette i movimenti di esecuzione movimenti trave e alzata o discesa del piano ferma pezzo
|
||||
function EmitStopBeam( MoData)
|
||||
EmitMoveStartChars(2)
|
||||
EmitMoveWaitChars(2)
|
||||
if MoData.StopBeamStat then sOut = 'M125 P2=' .. EgtNumToString( MoData.StopBeamStat, 0) end
|
||||
if MoData.StopBeamStat then
|
||||
if MoData.Load then
|
||||
EmitMoveStartChars( 3)
|
||||
EmitMoveWaitChars( 3)
|
||||
sOut = 'M125 P1=' .. EgtNumToString( MoData.StopBeamStat, 0)
|
||||
else
|
||||
EmitMoveStartChars( 2)
|
||||
EmitMoveWaitChars( 2)
|
||||
sOut = 'M125 P2=' .. EgtNumToString( MoData.StopBeamStat, 0)
|
||||
end
|
||||
end
|
||||
MyOutput( sOut)
|
||||
EMT.LASTOISBRAKE = true
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
|
||||
+28
-21
@@ -160,10 +160,10 @@ function OnSimulStart()
|
||||
local nId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( nGrpId, McdData[i].Sub), McdData[i].Name)
|
||||
if nId then
|
||||
table.insert( EMT.MCODET, nId)
|
||||
EgtOutLog( 'Element ' .. McdData[i].Grp .. '/' .. McdData[i].Sub .. '/' .. McdData[i].Name .. ' (' .. tostring( nId) .. ') is ok', 4)
|
||||
EgtOutLog( ' Element ' .. McdData[i].Grp .. '/' .. McdData[i].Sub .. '/' .. McdData[i].Name .. ' (' .. tostring( nId) .. ') is ok', 4)
|
||||
else
|
||||
nMcdNullCnt = nMcdNullCnt + 1
|
||||
EgtOutLog( 'Element ' .. McdData[i].Grp .. '/' .. McdData[i].Sub .. '/' .. McdData[i].Name .. ' is null', 4)
|
||||
EgtOutLog( ' Element ' .. McdData[i].Grp .. '/' .. McdData[i].Sub .. '/' .. McdData[i].Name .. ' is null', 4)
|
||||
end
|
||||
end
|
||||
if nMcdNullCnt > 0 then
|
||||
@@ -484,6 +484,7 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function OnSimulToolSelect( dPosA)
|
||||
EgtOutLog( '===> ToolSelect : Reset CollisionObj', 4)
|
||||
-- se utensile non definito, è disposizione ed esco
|
||||
if EMT.TOOL == '' then return end
|
||||
-- recupero dati utensile
|
||||
@@ -575,9 +576,9 @@ function OnSimulToolSelect( dPosA)
|
||||
-- se attivo Collision Check
|
||||
EMT.SAFEDIST = COLL_SAFE_DIST
|
||||
if EMT.COLLOBJ then
|
||||
local nInd = EgtIf( nSetHead ~= 2, 1001, 1011)
|
||||
local nInd = 1000 + tonumber( string.sub( EMT.HEAD, 2))
|
||||
AddToolToCollisionObj( EMT.TOOL, EMT.HEAD, EMT.EXIT, nInd, true)
|
||||
AddToolHolderToCollisionObj( EMT.TOOL, EMT.HEAD, EMT.EXIT, nInd + 1)
|
||||
AddToolHolderToCollisionObj( EMT.TOOL, EMT.HEAD, EMT.EXIT, nInd + 100)
|
||||
for i, Coll in ipairs( EMT.COLLOBJ or {}) do
|
||||
EmtAddCollisionObjEx( i, Coll.Fr, Coll.Ty, Coll.Mv, Coll.P1, Coll.P2, Coll.P3)
|
||||
end
|
||||
@@ -736,8 +737,9 @@ function OnSimulToolDeselect( dPrevA)
|
||||
-- prendo utensile lama su aggregato
|
||||
elseif EMT.NEXTHEAD == 'H22' then
|
||||
-- aggiungo utensile per verifica collisione
|
||||
AddToolToCollisionObj( EMT.NEXTTOOL, EMT.NEXTHEAD, EMT.NEXTEXIT, 1011, false)
|
||||
AddToolHolderToCollisionObj( EMT.NEXTTOOL, EMT.NEXTHEAD, EMT.NEXTEXIT, 1011 + 1)
|
||||
local nInd = 1000 + tonumber( string.sub( EMT.NEXTHEAD, 2))
|
||||
AddToolToCollisionObj( EMT.NEXTTOOL, EMT.NEXTHEAD, EMT.NEXTEXIT, nInd, false)
|
||||
AddToolHolderToCollisionObj( EMT.NEXTTOOL, EMT.NEXTHEAD, EMT.NEXTEXIT, nInd + 100)
|
||||
-- simulo movimento
|
||||
SimulMoveAxis( 'X2', ParkSawX2, MCH_SIM_STEP.RAPID)
|
||||
SimulMoveAxes( 'B2', ParkSawB2, MCH_SIM_STEP.COLLROT, 'C2', ParkSawC2, MCH_SIM_STEP.COLLROT)
|
||||
@@ -746,6 +748,7 @@ end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
function OnSimulMachiningStart()
|
||||
EgtOutLog( '===> Start Machining : ' .. EgtGetName( EMT.MCHID), 4)
|
||||
-- se lavorazione è con gruppo a forare, abilito le altre punte alla lavorazione del VMILL
|
||||
if EMT.HEAD == 'H14' then
|
||||
local OtherTools = EgtGetToolsInCurrSetupPos( 'T121')
|
||||
@@ -754,7 +757,7 @@ function OnSimulMachiningStart()
|
||||
if OtherTools[i] ~= '' and OtherTools[i] ~= EMT.TOOL then
|
||||
EmtAddToolForVmill( OtherTools[i], 'H14', i, EMT.VMILL)
|
||||
-- dichiaro utensile per verifica collisioni
|
||||
local nInd = 1011
|
||||
local nInd = 1000 + tonumber( string.sub( 'H14', 2))
|
||||
AddToolToCollisionObj( OtherTools[i], 'H14', i, nInd, true)
|
||||
end
|
||||
end
|
||||
@@ -821,9 +824,9 @@ function OnSimulMachiningStart()
|
||||
-- dichiaro utensile per Vmill
|
||||
EmtAddToolForVmill( sDouTool, sDouHead, nDouExit, EMT.VMILL)
|
||||
-- dichiaro utensile per verifica collisioni
|
||||
local nInd = 1011
|
||||
local nInd = 1000 + tonumber( string.sub( sDouHead, 2))
|
||||
AddToolToCollisionObj( sDouTool, sDouHead, nDouExit, nInd, true)
|
||||
AddToolHolderToCollisionObj( sDouTool, sDouHead, nDouExit, nInd + 1)
|
||||
AddToolHolderToCollisionObj( sDouTool, sDouHead, nDouExit, nInd + 100)
|
||||
-- salvo dati
|
||||
EMT.DOU_TLEN = EgtTdbGetCurrToolParam( MCH_TP.LEN)
|
||||
EMT.DOU_TTOTLEN = EgtTdbGetCurrToolParam( MCH_TP.TOTLEN)
|
||||
@@ -840,19 +843,17 @@ function OnSimulMachiningStart()
|
||||
local nSetHead = GetHeadSet( EMT.HEAD)
|
||||
if nSetHead ~= 1 and ( EMT.PREVTOOL_H1 and EMT.PREVHEAD_H1) then
|
||||
local nPrevExit_H1 = 1
|
||||
local nInd_H1 = 1001
|
||||
local nInd_H1 = 1000 + tonumber( string.sub( EMT.PREVHEAD_H1, 2))
|
||||
AddToolToCollisionObj( EMT.PREVTOOL_H1, EMT.PREVHEAD_H1, nPrevExit_H1, nInd_H1, true)
|
||||
AddToolHolderToCollisionObj( EMT.PREVTOOL_H1, EMT.PREVHEAD_H1, nPrevExit_H1, nInd_H1 + 1)
|
||||
AddToolHolderToCollisionObj( EMT.PREVTOOL_H1, EMT.PREVHEAD_H1, nPrevExit_H1, nInd_H1 + 100)
|
||||
end
|
||||
if nSetHead ~= 2 and ( EMT.PREVTOOL_H2 and EMT.PREVHEAD_H2) then
|
||||
local nPrevExit_H2 = 1
|
||||
local nInd_H2 = 1011
|
||||
local nInd_H2 = 1000 + tonumber( string.sub( EMT.PREVHEAD_H2, 2))
|
||||
AddToolToCollisionObj( EMT.PREVTOOL_H2, EMT.PREVHEAD_H2, nPrevExit_H2, nInd_H2, true)
|
||||
AddToolHolderToCollisionObj( EMT.PREVTOOL_H2, EMT.PREVHEAD_H2, nPrevExit_H2, nInd_H2 + 1)
|
||||
AddToolHolderToCollisionObj( EMT.PREVTOOL_H2, EMT.PREVHEAD_H2, nPrevExit_H2, nInd_H2 + 100)
|
||||
end
|
||||
if nSetHead ~= 3 and IsHeadExisting( 3) then
|
||||
local nPrevExit_H3 = 1
|
||||
local nInd_H3 = 1001
|
||||
local sHeadName
|
||||
if EgtGetHeadId( 'H39') then
|
||||
sHeadName = 'H39'
|
||||
@@ -861,8 +862,10 @@ function OnSimulMachiningStart()
|
||||
else
|
||||
EmtSetLastError( 1212, "HEAD not managed")
|
||||
end
|
||||
AddToolToCollisionObj( nil, sHeadName, nPrevExit_H3, 1001)
|
||||
AddToolHolderToCollisionObj( nil, sHeadName, nPrevExit_H3, 1002)
|
||||
local nPrevExit_H3 = 1
|
||||
local nInd_H3 = 1000 + tonumber( string.sub( sHeadName, 2))
|
||||
AddToolToCollisionObj( nil, sHeadName, nPrevExit_H3, nInd_H3)
|
||||
AddToolHolderToCollisionObj( nil, sHeadName, nPrevExit_H3, nInd_H3 + 100)
|
||||
end
|
||||
end
|
||||
-- se precedente in doppio ma ora solo testa 1 e non in sicurezza
|
||||
@@ -933,6 +936,10 @@ function OnSimulPathStart()
|
||||
EMT.TO_FALL = true
|
||||
end
|
||||
end
|
||||
-- dump oggetti di collisione
|
||||
if DumpCollisionObj then
|
||||
DumpCollisionObj( ' ==> CollisionObj :', 4)
|
||||
end
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
@@ -1445,10 +1452,10 @@ function OnSimulCollision()
|
||||
return
|
||||
end
|
||||
local Class = ''
|
||||
if EMT.SIMCOBIND == 1001 or EMT.SIMCOBIND == 1011 then
|
||||
Class = 'T_'..EMT.HEAD
|
||||
elseif EMT.SIMCOBIND == 1002 or EMT.SIMCOBIND == 1012 then
|
||||
Class = 'TH_'..EMT.HEAD
|
||||
if EMT.SIMCOBIND > 1000 and EMT.SIMCOBIND < 1099 then
|
||||
Class = 'T_H'.. tostring( EMT.SIMCOBIND - 1000)
|
||||
elseif EMT.SIMCOBIND > 1100 and EMT.SIMCOBIND < 1199 then
|
||||
Class = 'TH_H'..tostring( EMT.SIMCOBIND - 1100)
|
||||
else
|
||||
Class = EMT.COLLOBJ[EMT.SIMCOBIND].Cl
|
||||
end
|
||||
|
||||
+29
-12
@@ -687,7 +687,7 @@ function OnPostApplyMachining()
|
||||
local OriY2Delta = EMC.Y2DELTA
|
||||
local OriV1Pos = EMC.V1POS
|
||||
local OriV2Pos = EMC.V2POS
|
||||
local OriCnt = EMC.CNT
|
||||
local OriCnt = EMC.CNT
|
||||
-- eseguo le elaborazioni
|
||||
SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bLast and bUnload)
|
||||
-- se separazione, verifico il risultato
|
||||
@@ -763,8 +763,13 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
|
||||
local b3Tot = BBox3d()
|
||||
local b3Raw = BBox3d()
|
||||
local nNextOddPhase = GetNextStartOrRestPhase( EMC.PHASE)
|
||||
-- se esistono più grezzi toglie l'impostazione di scarico al carico
|
||||
if bUnloadOnLoadPos and ( nNextOddPhase and nNextOddPhase <= EgtGetPhaseCount()) then bUnloadOnLoadPos = false end
|
||||
-- se esistono più grezzi toglie l'impostazione di scarico al carico e ritorna errore
|
||||
if bUnloadOnLoadPos and ( nNextOddPhase and nNextOddPhase <= EgtGetPhaseCount()) then
|
||||
bUnloadOnLoadPos = false
|
||||
EMC.ERR = 22
|
||||
EMC.MSG = ' Error : Unload on Load Position not reachable if raw part on Load Position'
|
||||
return
|
||||
end
|
||||
local nRawId = EgtGetFirstRawPart()
|
||||
local nCurrRawId = GDB_ID.NULL
|
||||
while nRawId do
|
||||
@@ -1351,6 +1356,11 @@ end
|
||||
function SpecCalcUnloadOnLoadPos()
|
||||
local vCmdPre = {}
|
||||
EgtOutLog( ' *[UL]', 1)
|
||||
if not EMC.Y1DELTA and not EMC.Y2DELTA then
|
||||
EMC.ERR = 21
|
||||
EMC.MSG = ' Error : Y1 and Y2 not clamped for unloading'
|
||||
return {}
|
||||
end
|
||||
-- Se pinza Y2 chiusa, devo effettuare uno scambio
|
||||
local dY1DeltaMaxSP = MaxY1 - LoadT - TurnerOffs - 10 * GEO.EPS_SMALL
|
||||
if EMC.Y2DELTA or EMC.Y1DELTA > dY1DeltaMaxSP then
|
||||
@@ -1382,12 +1392,12 @@ function SpecCalcUnloadOnLoadPos()
|
||||
end
|
||||
-- riporto la trave al carico
|
||||
local dRotT = LoadT + TurnerOffs
|
||||
table.insert( vCmd, { 2, 'Y1', dRotT + EMC.Y1DELTA, 'T', dRotT})
|
||||
table.insert( vCmd, { 2, 'Y1', dRotT + EMC.Y1DELTA, 'T', dRotT, 'BrakeBeam'})
|
||||
-- apro la morsa
|
||||
table.insert( vCmd, { 11, 0})
|
||||
EMC.CNT = nil
|
||||
-- riporto il carrello in home
|
||||
table.insert( vCmd, { 1, 'Y1', ParkY1})
|
||||
table.insert( vCmd, { 1, 'Y1', ParkY1, 'UnBrakeBeam'})
|
||||
|
||||
-- eventuale unione tabelle
|
||||
if #vCmdPre > 0 then
|
||||
@@ -1402,16 +1412,23 @@ function SpecCalcUnload()
|
||||
-- In caso di condizioni rispettate richiama lo scarico al carico e ritorna
|
||||
local nNextPathId
|
||||
local nNextMchId
|
||||
local nNextDispId
|
||||
if EMC.PATHID then nNextPathId = EgtGetNextActiveOperation( EMC.PATHID) end
|
||||
if EMC.MCHID then nNextMchId = EgtGetNextActiveOperation( EMC.MCHID) end
|
||||
if EMC.DISPID then nNextDispId = EgtGetNextActiveOperation( EMC.DISPID) end
|
||||
-- se il pezzo dev'essere scaricato al carico
|
||||
local dUnloadType = EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL, 'UNLOAD', 'd')
|
||||
local bUnloadOnLoadPos = dUnloadType == 1 or dUnloadType == -1
|
||||
|
||||
-- Opzione attiva, è l'ultimo path, è l'ultima lavorazione e non c'è rimanenza
|
||||
if bUnloadOnLoadPos and not nNextPathId and not nNextMchId and not IsStartOrRestPhase(EMC.PHASE) then
|
||||
local vCmd = SpecCalcUnloadOnLoadPos()
|
||||
return vCmd
|
||||
if bUnloadOnLoadPos then
|
||||
-- è l'ultimo path, è l'ultima lavorazione, non ci sono altre disposizioni e non c'è rimanenza
|
||||
if not nNextPathId and not nNextMchId and not nNextDispId and not IsStartOrRestPhase(EMC.PHASE) then
|
||||
local vCmd = SpecCalcUnloadOnLoadPos()
|
||||
return vCmd
|
||||
else
|
||||
EMC.ERR = 21
|
||||
EMC.MSG = ' Error : Unload on Load Position not reachable if raw part on Load Position'
|
||||
return {}
|
||||
end
|
||||
end
|
||||
local vCmdPre = {}
|
||||
EgtOutLog( ' *[U]', 1)
|
||||
@@ -1668,7 +1685,7 @@ local function PosForEnl1FY1( dY1a, dY2a, dTa, dExtra, dCorsaY1e, dCorsaY2Te)
|
||||
if dDispl/2 <= dCorsaY1e then
|
||||
dY1a = dY1a + dDispl / 2
|
||||
dY2a = dY2a - dDispl / 2
|
||||
dTa = dTa - dDispl / 2
|
||||
dTa = dTa - dDispl / 2
|
||||
else
|
||||
dY1a = dY1a + dCorsaY1e
|
||||
dY2a = dY2a - (dDispl - dCorsaY1e)
|
||||
@@ -1690,7 +1707,7 @@ local function PosForEnl1FY2( dY1a, dY2a, dTa, dExtra, dCorsaY1Te, dCorsaY2e)
|
||||
if dDispl/2 <= dCorsaY1Te then
|
||||
if dDispl/2 <= dCorsaY2e then
|
||||
dY1a = dY1a + dDispl / 2
|
||||
dTa = dTa + dDispl / 2
|
||||
dTa = dTa + dDispl / 2
|
||||
dY2a = dY2a - dDispl / 2
|
||||
else
|
||||
dY2a = dY2a - dCorsaY2e
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
require( 'EmtGenerator')
|
||||
EgtEnableDebug( false)
|
||||
|
||||
PP_VER = '3.1a2_DEV9'
|
||||
PP_VER = '3.1a2_DEV21'
|
||||
PP_NVER = '3.1.1.2'
|
||||
MIN_MACH_VER = '2.7d2'
|
||||
MACH_NAME = EgtGetCurrMachineName()
|
||||
@@ -86,7 +86,7 @@ ParkTc2X1 = 3100
|
||||
ParkZ1 = -545
|
||||
ParkC1 = -90
|
||||
ParkB1 = -90
|
||||
ParkCSawX1 = 1500
|
||||
ParkCSawX1 = 1700
|
||||
ParkCSawZ1 = -100
|
||||
ParkCSaw0Z1 = -400
|
||||
ParkCSawC1 = -90
|
||||
@@ -508,6 +508,7 @@ local H31Id = EmtHead {
|
||||
TDir = Vector3d( 0, 0, 1),
|
||||
ADir = X_AX(),
|
||||
Rot1W = 0.2,
|
||||
SolCh = MCH_SCC.ADIR_XM,
|
||||
Rot2Stroke = {MinB3, MaxB3},
|
||||
OthColl = {'B3/SOLID', 'C3/SOLID'},
|
||||
Geo = 'H38_HEAD/GEO'}
|
||||
|
||||
Binary file not shown.
@@ -20,6 +20,7 @@
|
||||
2=d,OpenMinSafe,0
|
||||
3=d,OpenOutRaw,0
|
||||
4=l,MaxOptSize,0
|
||||
5=b,AdjustFeed,1
|
||||
|
||||
[Mortising]
|
||||
0=d,MaxElev,0
|
||||
|
||||
Binary file not shown.
@@ -1,5 +1,8 @@
|
||||
==== Common_PF1250 Update Log ====
|
||||
|
||||
Versione 3.1b1 (17/02/2026)
|
||||
- (GEN) Generazione non allineata a simulazione. Ticket#2819
|
||||
|
||||
Versione 3.1a2 (30/01/2026)
|
||||
- (SIM) Allineato approccio simulazione a generazione in caso di lavorazione in doppio verticale. Ticket#2781
|
||||
- (GEN) Simulazione non allineata a generazione. Mancava reset flag di pezzo a caduta. Ticket#2798
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
local InfoCommon_STD_PP = {
|
||||
NAME = 'Common_PF1250', -- nome script PP standard
|
||||
VERSION = '3.1a2', -- versione script
|
||||
VERSION = '3.1b1', -- versione script
|
||||
MIN_MACH_VER_PP_COMMON = '2.7k1' -- versione minima kernel
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user