Corretto salvataggio variabili
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@
|
||||
-- Corretto calcolo valori per feed assi
|
||||
|
||||
require( 'EmtGenerator')
|
||||
EgtEnableDebug( false)
|
||||
EgtEnableDebug( true)
|
||||
|
||||
PP_VER = '2.7l3_DEV1'
|
||||
MIN_MACH_VER = '2.7l2'
|
||||
|
||||
+21
-11
@@ -233,8 +233,8 @@ function OnSpecialApplyDisposition()
|
||||
if #vAxes > 0 then EMC.TPOS = vAxes[1] end
|
||||
EMC.X1DELTA = EgtGetInfo( nLastPathId, 'X1DELTA', 'd')
|
||||
EMC.X2DELTA = EgtGetInfo( nLastPathId, 'X2DELTA', 'd')
|
||||
EMC.DISTFRONT = EgtGetInfo( nLastPathId, 'DISTFRONT', 'd')
|
||||
EMC.DISTBACK = EgtGetInfo( nLastPathId, 'DISTBACK', 'd')
|
||||
EMC.DISTFRONT = EgtGetInfo( nLastPathId, 'DISTFRONT', 'd') or 0
|
||||
EMC.DISTBACK = EgtGetInfo( nLastPathId, 'DISTBACK', 'd') or 0
|
||||
end
|
||||
-- Determinazione delle dimensioni del grezzo in lavoro
|
||||
local b3Raw = BBox3d()
|
||||
@@ -267,8 +267,8 @@ function OnSpecialApplyDisposition()
|
||||
if #vAxes > 0 then EMC.TPOS = vAxes[1] end
|
||||
EMC.X1DELTA = EgtGetInfo( nLastPathId, 'X1DELTA', 'd')
|
||||
EMC.X2DELTA = EgtGetInfo( nLastPathId, 'X2DELTA', 'd')
|
||||
EMC.DISTFRONT = EgtGetInfo( nLastPathId, 'DISTFRONT', 'd')
|
||||
EMC.DISTBACK = EgtGetInfo( nLastPathId, 'DISTBACK', 'd')
|
||||
EMC.DISTFRONT = EgtGetInfo( nLastPathId, 'DISTFRONT', 'd') or 0
|
||||
EMC.DISTBACK = EgtGetInfo( nLastPathId, 'DISTBACK', 'd') or 0
|
||||
-- Determinazione delle dimensioni del grezzo in lavoro
|
||||
local b3Raw = BBox3d()
|
||||
local nRawId = EgtGetFirstRawPart()
|
||||
@@ -430,8 +430,8 @@ function OnPostApplyMachining()
|
||||
if #vAxes > 0 then EMC.TPOS = vAxes[1] end
|
||||
EMC.X1DELTA = EgtGetInfo( nLastPathId, 'X1DELTA', 'd')
|
||||
EMC.X2DELTA = EgtGetInfo( nLastPathId, 'X2DELTA', 'd')
|
||||
EMC.DISTFRONT = EgtGetInfo( nLastPathId, 'DISTFRONT', 'd')
|
||||
EMC.DISTBACK = EgtGetInfo( nLastPathId, 'DISTBACK', 'd')
|
||||
EMC.DISTFRONT = EgtGetInfo( nLastPathId, 'DISTFRONT', 'd') or 0
|
||||
EMC.DISTBACK = EgtGetInfo( nLastPathId, 'DISTBACK', 'd') or 0
|
||||
end
|
||||
-- altrimenti precedente operazione è lavorazione
|
||||
else
|
||||
@@ -446,8 +446,8 @@ function OnPostApplyMachining()
|
||||
if #vAxes > 0 then EMC.TPOS = vAxes[1] end
|
||||
EMC.X1DELTA = EgtGetInfo( nLastPathId, 'X1DELTA', 'd')
|
||||
EMC.X2DELTA = EgtGetInfo( nLastPathId, 'X2DELTA', 'd')
|
||||
EMC.DISTFRONT = EgtGetInfo( nLastPathId, 'DISTFRONT', 'd')
|
||||
EMC.DISTBACK = EgtGetInfo( nLastPathId, 'DISTBACK', 'd')
|
||||
EMC.DISTFRONT = EgtGetInfo( nLastPathId, 'DISTFRONT', 'd') or 0
|
||||
EMC.DISTBACK = EgtGetInfo( nLastPathId, 'DISTBACK', 'd') or 0
|
||||
end
|
||||
|
||||
-- Verifico se ultima lavorazione della fase
|
||||
@@ -588,7 +588,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload, bPreR
|
||||
local dDistFront, dDistBack, dMaxLenLeft
|
||||
local bClampsSamePosition = EgtGetInfo( EMC.MCHID, 'ClampFIX', 'd') == 1 or false
|
||||
-- se la posizione è già stata calcolata a partire da una lavorazione precedente
|
||||
if bClampsSamePosition and EMC.DISTFRONT and EMC.DISTBACK then
|
||||
if bClampsSamePosition then
|
||||
dDistFront = EMC.DISTFRONT
|
||||
dDistBack = EMC.DISTBACK
|
||||
-- altrimenti si ricalcola la posizione a partire dalla lavorazione attuale
|
||||
@@ -816,6 +816,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload, bPreR
|
||||
vCmd = SpecCalcSplit( b3Raw:getDimX(), EMC.MAXLENLEFT)
|
||||
else
|
||||
vCmd = SpecCalcSplitRot( b3Raw:getDimX())
|
||||
EMC.DISTBACK = nil
|
||||
end
|
||||
end
|
||||
-- Se taglio finale di grezzo a perdere
|
||||
@@ -2161,8 +2162,17 @@ function SpecOutputCmds( vCmd, bEnd)
|
||||
end
|
||||
|
||||
-- gli ingombri della lavorazione sono sempre salvati
|
||||
EgtSetInfo( EMC.PATHID, 'DISTBACK', EMC.DISTBACK)
|
||||
EgtSetInfo( EMC.PATHID, 'DISTFRONT', EMC.DISTFRONT)
|
||||
if EMC.DISTBACK then
|
||||
EgtSetInfo( EMC.PATHID, 'DISTBACK', EMC.DISTBACK)
|
||||
else
|
||||
EgtRemoveInfo( EMC.PATHID, 'DISTBACK')
|
||||
end
|
||||
|
||||
if EMC.DISTFRONT then
|
||||
EgtSetInfo( EMC.PATHID, 'DISTFRONT', EMC.DISTFRONT)
|
||||
else
|
||||
EgtRemoveInfo( EMC.PATHID, 'DISTFRONT')
|
||||
end
|
||||
|
||||
-- Salvo i nuovi delta dei carrelli
|
||||
if EMC.X1DELTA then
|
||||
|
||||
Reference in New Issue
Block a user