Scrittura macro tastatura G145 e faccia opportuna in base a direzione utensile
This commit is contained in:
+20
-1
@@ -609,10 +609,14 @@ function OnMachiningEnd()
|
||||
EMT.AUXTYPE = nil
|
||||
EMT.TO_ZMAX = nil
|
||||
EMT.TO_XHOME = nil
|
||||
EMT.PROBE = nil
|
||||
EMT.PREVTOOL = EMT.TOOL
|
||||
EMT.PREVHEAD = EMT.HEAD
|
||||
EMT.PREVTCPOS = EMT.TCPOS
|
||||
-- se tastatura attiva, si disabilita la tastatura
|
||||
if EMT.PROBE then
|
||||
EmtOutput( 'G145 Z-10 EF7')
|
||||
EMT.PROBE = nil
|
||||
end
|
||||
-- se taglio finale, aggiorno lunghezza barra
|
||||
if EMT.MCHCUT then
|
||||
EMT.LB = EMT.LT + ( EMT.X_OFF or 0)
|
||||
@@ -1516,6 +1520,21 @@ function OnRapid()
|
||||
EMT.RELOAD = false
|
||||
EMT.RELOAD2 = nil
|
||||
end
|
||||
-- se bisogna fare tastatura
|
||||
if EMT.PROBE then
|
||||
local vtE = Vector3d( EMT.EXTR)
|
||||
local sFace
|
||||
if AreSameVectorApprox( vtE, Y_AX()) then
|
||||
sFace = 2
|
||||
elseif AreSameVectorApprox( vtE, -Y_AX()) then
|
||||
sFace = 4
|
||||
elseif AreSameVectorApprox( vtE, Z_AX()) then
|
||||
sFace = 3
|
||||
else
|
||||
error( "PROBING DIRECTION NOT MANAGED")
|
||||
end
|
||||
EmtOutput( 'G145 Z-10 EF'..sFace)
|
||||
end
|
||||
-- se taglio di coda senza residuo da scaricare, emetto M175 per accelerare il carico della barra successiva
|
||||
if EMT.MCHUSERNOTES and EMT.MCHUSERNOTES:find( 'Cut', 1, true) then
|
||||
EmtOutput( 'M175')
|
||||
|
||||
+1
-1
@@ -2285,7 +2285,7 @@ end
|
||||
---------------------------------------------------------------------
|
||||
function VerifyToolProbeCompatibility()
|
||||
local bToolIsCompatible = false
|
||||
if EMT.TOOLLEN < 200 and EMT.TOOLDIAM < 80 then
|
||||
if EMT.TTOTLEN < 200 and EMT.TTOTDIAM < 80 then
|
||||
bToolIsCompatible = true
|
||||
end
|
||||
return bToolIsCompatible
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user