Corretta gestione motosega sotto traversa

This commit is contained in:
andrea.villa
2026-06-26 08:31:09 +02:00
parent 4eb9669e1a
commit 15beda3295
2 changed files with 15 additions and 8 deletions
+2 -2
View File
@@ -2101,11 +2101,11 @@ function MyAdjustLinearAxes()
local Len = EMT.TLEN + dAddLen + Mill2Offs
local LenRef = Mill2Offs
vtE = Vector3d( EMT.TDIR) * Len - Z_AX() * LenRef
elseif EMT.HEAD == 'H13' then
elseif EMT.HEAD == 'H13' or EMT.HEAD == 'H15' then
local Len = ( EMT.TDIST or ChSawLen) + MillOffs
local LenRef = MillOffs
vtE = Vector3d( EMT.ADIR) * Len - Z_AX() * LenRef
elseif EMT.HEAD == 'H15' or EMT.HEAD == 'H23' then
elseif EMT.HEAD == 'H23' then
local Len = ( EMT.TDIST or ChSawLen) + Mill2Offs
local LenRef = Mill2Offs
vtE = Vector3d( EMT.ADIR) * Len - Z_AX() * LenRef
+13 -6
View File
@@ -32,7 +32,7 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '3.1f1_RC7'
PP_VER = '3.1f1_RC8'
PP_NVER = '3.1.6.1'
MIN_MACH_VER = '2.5k1'
MACH_NAME = EgtGetCurrMachineName()
@@ -836,13 +836,10 @@ function OnSetHead()
EmtModifyAxisHome( 'B1', MyHomeB1)
end
-- se testa H13 (sega a catena)
elseif EMC.HEAD == 'H13' then
elseif EMC.HEAD == 'H13' or EMC.HEAD == 'H15' then
-- aggiustamenti per distanza
local dDist = EgtIf( EMC.DIST and abs( EMC.DIST) > 1, EMC.DIST, ChSawLen)
EmtModifyExitPosition( EMC.HEAD, EMC.EXIT, Point3d( 0, 0, -dDist))
local vtMove = Point3d( 0, 0, -dDist) - Point3d( EMC.EXITPOS)
local ExitId = EgtGetFirstNameInGroup( EgtGetHeadId( EMC.HEAD), 'T'..tostring( EMC.EXIT))
EgtMove( ExitId, vtMove)
-- recupero valore asse A bloccato
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS)
local CSawPosA = tonumber( sVal:sub( 3) or '')
@@ -860,10 +857,14 @@ end
---------------------------------------------------------------------
-------------------------- Testa utilizzata -------------------------
function GetHeadSet( sHead)
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H15' then
if sHead == 'H11' or sHead == 'H12' or sHead == 'H13' or sHead == 'H15' or sHead == 'H17' then
return 1
elseif sHead == 'H19' then
return 11
elseif sHead == 'H21' or sHead == 'H22' or sHead == 'H23' then
return 2
elseif sHead == 'H29' then
return 21
else
return 0
end
@@ -911,6 +912,12 @@ function HeadIsChainSaw( sHead)
return ( sHead == 'H13' or sHead == 'H15')
end
---------------------------------------------------------------------
-- Funzione che riconosce testa per tastatore
function HeadIsProbe( sHead)
return ( sHead == 'H19' or sHead == 'H29')
end
---------------------------------------------------------------------
-- Funzione che calcola la posizione Home di Z per la sega a catena dal valore dell'asse virtuale
function GetChainSawZHomeFromVirtualAxis( dPosA)