Corretta gestione paraemtro LASTOISBRAKE
This commit is contained in:
+31
-19
@@ -303,22 +303,27 @@ 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
|
||||
EMT.LASTOISBRAKE = nil
|
||||
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)
|
||||
@@ -539,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
|
||||
@@ -562,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)
|
||||
@@ -3161,7 +3174,6 @@ function EmitStopBeam( MoData)
|
||||
end
|
||||
end
|
||||
MyOutput( sOut)
|
||||
EMT.LASTOISBRAKE = true
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
require( 'EmtGenerator')
|
||||
EgtEnableDebug( false)
|
||||
|
||||
PP_VER = '3.1a2_DEV21'
|
||||
PP_VER = '3.1a2_DEV22'
|
||||
PP_NVER = '3.1.1.2'
|
||||
MIN_MACH_VER = '2.7d2'
|
||||
MACH_NAME = EgtGetCurrMachineName()
|
||||
|
||||
Reference in New Issue
Block a user