Compare commits

...

6 Commits

4 changed files with 55 additions and 17 deletions
+2 -2
View File
@@ -118,8 +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
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
+33 -12
View File
@@ -303,11 +303,13 @@ 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
@@ -323,6 +325,7 @@ function OnDispositionEnd()
else
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'
@@ -541,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
@@ -564,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)
@@ -2219,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}
@@ -2230,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
@@ -3152,7 +3174,6 @@ function EmitStopBeam( MoData)
end
end
MyOutput( sOut)
EMT.LASTOISBRAKE = true
end
---------------------------------------------------------------------
+19 -2
View File
@@ -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,7 +1394,22 @@ function SpecCalcUnloadOnLoadPos()
end
-- riporto la trave al carico
local dRotT = LoadT + TurnerOffs
table.insert( vCmd, { 2, 'Y1', dRotT + EMC.Y1DELTA, 'T', dRotT, 'BrakeBeam'})
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
+1 -1
View File
@@ -5,7 +5,7 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '3.1a2_DEV19'
PP_VER = '3.1a2_DEV23'
PP_NVER = '3.1.1.2'
MIN_MACH_VER = '2.7d2'
MACH_NAME = EgtGetCurrMachineName()