- In caso di motosega prelevata, si ruota in home.
- Cambio versione per rilascio a cliente
This commit is contained in:
+8
-14
@@ -662,28 +662,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 sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4')
|
||||
local sOutPreMove
|
||||
if EMT.HEAD == 'H3' or bGoToHome then
|
||||
if EMT.PREVHEAD == 'H3' then
|
||||
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
|
||||
if EMT.HEAD == 'H3' and bGoToHome then
|
||||
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
|
||||
' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1pp, 3) .. sEE .. sEL .. sER .. sET .. sES
|
||||
else
|
||||
local dPosA = GetCurrChainSawingVirtualAxis()
|
||||
local MyParkCSawC = GetChainSawCHomeFromVirtualAxis( dPosA)
|
||||
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
|
||||
' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( MyParkCSawC, 3) .. sEE .. sEL .. sER .. sET .. sES
|
||||
end
|
||||
EmtOutput( sOutPreMove)
|
||||
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
|
||||
' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
|
||||
EmtOutput( sOutPreMove)
|
||||
elseif EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then
|
||||
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
|
||||
' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
|
||||
EmtOutput( sOutPreMove)
|
||||
end
|
||||
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
|
||||
' B' .. EgtNumToString( EMT.R2, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
|
||||
|
||||
Reference in New Issue
Block a user