- In caso di motosega prelevata, si ruota in home.
- Cambio versione per rilascio a cliente
This commit is contained in:
+8
-14
@@ -689,28 +689,22 @@ function OnRapid()
|
||||
EmtOutput( '( * ' .. sOut .. ' * )')
|
||||
end
|
||||
|
||||
local bSplitMove = false
|
||||
bSplitMove = bSplitMove or EMT.HEAD == 'H3'
|
||||
bSplitMove = bSplitMove or ( not EMT.LOAD and ( bZmax and EMT.TTOTLEN > 200))
|
||||
bSplitMove = bSplitMove or ( not EMT.LOAD and ( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome))
|
||||
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
|
||||
if bSplitMove and EMT.FLAG2 == 1 then
|
||||
if not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and
|
||||
( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome) and EMT.FLAG2 == 1 then
|
||||
local sOutPreMove
|
||||
if EMT.HEAD == 'H3' or bGoToHome then
|
||||
if EMT.PREVHEAD == 'H3' then
|
||||
sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
|
||||
if EMT.HEAD == 'H3' and bGoToHome then
|
||||
sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
|
||||
' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1pp, EMT.DECMACRO) ..
|
||||
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
|
||||
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
|
||||
else
|
||||
local dPosA = GetCurrChainSawingVirtualAxis()
|
||||
local MyParkCSawC = GetChainSawCHomeFromVirtualAxis( dPosA)
|
||||
sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
|
||||
' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( MyParkCSawC, EMT.DECMACRO) ..
|
||||
EmtOutput( sOutPreMove)
|
||||
sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
|
||||
' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) ..
|
||||
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
|
||||
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
|
||||
end
|
||||
EmtOutput( sOutPreMove)
|
||||
elseif EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then
|
||||
sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
|
||||
' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) ..
|
||||
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
|
||||
|
||||
Reference in New Issue
Block a user