Prima versione funzionante gestione aggregato foratore multiplo
This commit is contained in:
@@ -128,6 +128,8 @@ function OnToolData()
|
||||
dAddLen = -SawOffsZ
|
||||
elseif EMT.HEAD == 'H16' then
|
||||
dAddLen = -Saw2OffsZ
|
||||
elseif EMT.HEAD == 'H14' then
|
||||
dAddLen = 206 -- dimensione aggregato
|
||||
end
|
||||
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( dAddLen + EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) ..
|
||||
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( dAddLen + EMT.TTOTLEN, 3)
|
||||
@@ -406,6 +408,13 @@ function OnMachiningStart()
|
||||
-- imposto home dell'asse C1 (A=0 -> T101, A=90 -> T104)
|
||||
local MyParkCSawC1 = GetChainSawCHomeFromVirtualAxis( dPosA, EMT.TTOTLEN)
|
||||
EmtModifyAxisHome( 'C1', MyParkCSawC1)
|
||||
-- aggregato foratura multipla, aggiusto subito angolo scelto per asse virtuale A
|
||||
elseif EMT.HEAD == 'H14' then
|
||||
-- valore dell'asse virtuale
|
||||
dPosA = GetCurrMultiDrillVirtualAxis()
|
||||
-- imposto home dell'asse C1 (A=0 -> T121, A=90 -> T124)
|
||||
local MyParkMultiDrillC1 = GetMultiDrillCHomeFromVirtualAxis( dPosA, EMT.TTOTLEN)
|
||||
EmtModifyAxisHome( 'C1', MyParkMultiDrillC1)
|
||||
-- se lama su aggregato testa sotto, aggiusto subito angolo scelto per asse virtuale A
|
||||
elseif EMT.HEAD == 'H22' then
|
||||
-- valore dell'asse virtuale
|
||||
@@ -757,6 +766,9 @@ function OnRapid()
|
||||
-- se sega a catena
|
||||
if EMT.HEAD == 'H13' then
|
||||
EmitMoveDataHead( 1, { X=-ParkCSawX1, Z=HomeZ1, B=HomeR2, C=HomeR1, TRad=dTRad, TLen=dTLen, S=Speed})
|
||||
-- aggregato foratore multiplo
|
||||
elseif EMT.HEAD == 'H14' then
|
||||
EmitMoveDataHead( 1, { X=-ParkMultiDrillX1, Z=HomeZ1, B=HomeR2, C=HomeR1, TRad=dTRad, TLen=dTLen, S=Speed})
|
||||
-- utensili standard
|
||||
else
|
||||
-- utensili lunghi
|
||||
@@ -2311,6 +2323,20 @@ function AdjustTcPos( bLen3, sTcPos, dAxR3)
|
||||
EmtSetLastError( 1210, 'Chain saw orientation not allowed')
|
||||
end
|
||||
end
|
||||
if sPos == '121' then
|
||||
if not dAxR3 then dAxR3 = EMT.R3 end
|
||||
if abs( dAxR3 - 0) < 0.1 then
|
||||
sPos = '121'
|
||||
elseif abs( dAxR3 - 270) < 0.1 then
|
||||
sPos = '122'
|
||||
elseif abs( dAxR3 - 180) < 0.1 then
|
||||
sPos = '123'
|
||||
elseif abs( dAxR3 - 90) < 0.1 then
|
||||
sPos = '124'
|
||||
else
|
||||
EmtSetLastError( 1210, 'MultiDrill orientation not allowed')
|
||||
end
|
||||
end
|
||||
if sPos == '201' then
|
||||
if not dAxR3 then dAxR3 = EMT.R3 end
|
||||
if abs( dAxR3 - 0) < 0.1 then
|
||||
|
||||
Reference in New Issue
Block a user