Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8089a830e4 | |||
| 4016796045 | |||
| cad19cffca | |||
| 77cf0826d5 | |||
| 996185e332 | |||
| ec0e8b479a | |||
| c06e5c334e | |||
| 185a3d8338 | |||
| 38ea77dfad | |||
| 70e8556c69 | |||
| 4ab2a89f2d | |||
| 6ad7cf16c4 | |||
| 57a557ec16 | |||
| dfdce8b00d | |||
| d486d48a49 |
+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 = EgtClamp( Machine.Offsets.MIN_JOIN_S, 80, 150) end
|
||||
if Machine.Offsets.MIN_JOIN_L then BeamData.MIN_JOIN_L = EgtClamp( Machine.Offsets.MIN_JOIN_L, 300, 450) end
|
||||
end
|
||||
if Machine.Trave then
|
||||
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
|
||||
|
||||
+78
-24
@@ -303,22 +303,29 @@ function OnDispositionEnd()
|
||||
-- Se è un'istruzione del piano ferma pezzo
|
||||
if EMT.MDCHAR[i].StopBeamStat then
|
||||
EmitStopBeam( EMT.MDCHAR[i])
|
||||
EMT.LASTOISBRAKE = true
|
||||
else
|
||||
EmitMoveDataChars( EMT.MDCHAR[i])
|
||||
if EMT.MDCHAR[i].Y1 then EMT.CHY_ON = true end
|
||||
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
|
||||
EMT.LASTOISBRAKE = false
|
||||
end
|
||||
end
|
||||
if #EMT.MDCHAR > 0 then
|
||||
local nMoveType = EgtIf( EMT.CHY_ON, 3, 2)
|
||||
EmitMoveStartChars( nMoveType)
|
||||
-- se dopo c'è scarico spezzone devo mettere attesa termine esecuzione
|
||||
if IsRestPhase( EMT.PHASE + 1) then
|
||||
EmitMoveWaitChars( nMoveType)
|
||||
if not EMT.LASTOISBRAKE then
|
||||
local nMoveType = EgtIf( EMT.CHY_ON, 3, 2)
|
||||
EmitMoveStartChars( nMoveType)
|
||||
-- se dopo c'è scarico spezzone devo mettere attesa termine esecuzione
|
||||
if IsRestPhase( EMT.PHASE + 1) then
|
||||
EmitMoveWaitChars( nMoveType)
|
||||
else
|
||||
EmitMoveWaitChars( nMoveType, true)
|
||||
end
|
||||
else
|
||||
EmitMoveWaitChars( nMoveType, true)
|
||||
EMT.LASTOISBRAKE = nil
|
||||
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'
|
||||
@@ -537,22 +544,28 @@ function OnMachiningEnd()
|
||||
-- Se è un'istruzione del piano ferma pezzo
|
||||
if EMT.MDCHAR[i].StopBeamStat then
|
||||
EmitStopBeam( EMT.MDCHAR[i])
|
||||
EMT.LASTOISBRAKE = true
|
||||
else
|
||||
EmitMoveDataChars( EMT.MDCHAR[i])
|
||||
EMT.LASTOISBRAKE = false
|
||||
end
|
||||
end
|
||||
if #EMT.MDCHAR > 0 then
|
||||
if EMT.AUXTYPE == 'S' then
|
||||
EmitMoveStartChars( 1)
|
||||
EmitMoveWaitChars( 1)
|
||||
if not EMT.LASTOISBRAKE then
|
||||
EmitMoveStartChars( 1)
|
||||
EmitMoveWaitChars( 1)
|
||||
end
|
||||
elseif EMT.AUXTYPE == 'U' then
|
||||
local nMoveType = EgtIf( EMT.CHY_ON, 3, 2)
|
||||
EmitMoveStartChars( nMoveType)
|
||||
-- se dopo cè scarico spezzone devo mettere attesa termine esecuzione
|
||||
if IsRestPhase( EMT.PHASE + 1) then
|
||||
EmitMoveWaitChars( nMoveType)
|
||||
else
|
||||
EmitMoveWaitChars( nMoveType, true)
|
||||
if not EMT.LASTOISBRAKE then
|
||||
local nMoveType = EgtIf( EMT.CHY_ON, 3, 2)
|
||||
EmitMoveStartChars( nMoveType)
|
||||
-- se dopo cè scarico spezzone devo mettere attesa termine esecuzione
|
||||
if IsRestPhase( EMT.PHASE + 1) then
|
||||
EmitMoveWaitChars( nMoveType)
|
||||
else
|
||||
EmitMoveWaitChars( nMoveType, true)
|
||||
end
|
||||
end
|
||||
-- emissione conclusione pezzo precedente (se non è modalità test)
|
||||
if not TEST_USE and EMT.PRODID then
|
||||
@@ -560,8 +573,10 @@ function OnMachiningEnd()
|
||||
MyOutput( sEnd)
|
||||
end
|
||||
elseif EMT.AUXTYPE == 'P' then
|
||||
EmitMoveStartChars( 3)
|
||||
EmitMoveWaitChars( 3)
|
||||
if not EMT.LASTOISBRAKE then
|
||||
EmitMoveStartChars( 3)
|
||||
EmitMoveWaitChars( 3)
|
||||
end
|
||||
if EMT.FALL then
|
||||
MyOutput( 'M155')
|
||||
-- emissione conclusione pezzo (se non in modalità test)
|
||||
@@ -571,6 +586,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
|
||||
@@ -2013,8 +2033,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}
|
||||
@@ -2026,6 +2053,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
|
||||
@@ -2113,12 +2145,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)
|
||||
@@ -2135,7 +2170,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)}
|
||||
@@ -2195,6 +2230,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}
|
||||
@@ -2206,6 +2247,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
|
||||
@@ -3116,9 +3162,17 @@ 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)
|
||||
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
|
||||
|
||||
+20
-3
@@ -1226,7 +1226,9 @@ function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1Del
|
||||
WorkTab.dY1DeltaMaxF = min( EMC.LB - MinJoin, MaxY1 + dDistFront + dRollFront + AGG_V)
|
||||
WorkTab.dY2DeltaMinF = max( MinJoin + EMC.HCING + EMC.HOVM, EMC.LB + MinY2 - dMyDistBack - AGG_V - dRollBack)
|
||||
WorkTab.dY2DeltaMaxF = min( dDistFront, EMC.LB - MyMinOther) -- - EMC.TCING
|
||||
if dY1DeltaMaxSP then WorkTab.dY1DeltaMaxF = min( WorkTab.dY1DeltaMaxF, dY1DeltaMaxSP) end
|
||||
if dY1DeltaMaxSP and dY1DeltaMaxSP > WorkTab.dY1DeltaMinF then
|
||||
WorkTab.dY1DeltaMaxF = min( WorkTab.dY1DeltaMaxF, dY1DeltaMaxSP)
|
||||
end
|
||||
if dY2DeltaMinUL then WorkTab.dY2DeltaMinF = max( WorkTab.dY2DeltaMinF, dY2DeltaMinUL) end
|
||||
WorkTab.dV1PosF = dRollBack
|
||||
WorkTab.bV1CloseF = false
|
||||
@@ -1392,12 +1394,27 @@ function SpecCalcUnloadOnLoadPos()
|
||||
end
|
||||
-- riporto la trave al carico
|
||||
local dRotT = LoadT + TurnerOffs
|
||||
table.insert( vCmd, { 2, 'Y1', dRotT + EMC.Y1DELTA, 'T', dRotT})
|
||||
local dY1Move = dRotT + EMC.Y1DELTA
|
||||
if dY1Move > MaxY1 then
|
||||
local dRotTStep, dY1MoveStep = dRotT - dY1Move + MaxY1, MaxY1
|
||||
if MinBeamLenUnloadInLine and EMC.LB >= MinBeamLenUnloadInLine then
|
||||
table.insert( vCmd, { 2, 'Y1', dY1MoveStep, 'T', dRotTStep, 'BrakeBeam'})
|
||||
-- apro la morsa
|
||||
table.insert( vCmd, { 11, 0})
|
||||
-- riporto il carrello in fondo alla trave
|
||||
dY1MoveStep = dRotTStep + ( EMC.HCING or 0)
|
||||
dY1Move = dY1MoveStep + dY1Move - MaxY1
|
||||
table.insert( vCmd, { 1, 'Y1', dY1MoveStep, 'UnBrakeBeam'})
|
||||
-- chiudo la morsa
|
||||
table.insert( vCmd, { 11, 1})
|
||||
end
|
||||
end
|
||||
table.insert( vCmd, { 2, 'Y1', dY1Move, '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
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
require( 'EmtGenerator')
|
||||
EgtEnableDebug( false)
|
||||
|
||||
PP_VER = '3.1a2_DEV14'
|
||||
PP_VER = '3.1a2_DEV23'
|
||||
PP_NVER = '3.1.1.2'
|
||||
MIN_MACH_VER = '2.7d2'
|
||||
MACH_NAME = EgtGetCurrMachineName()
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user