diff --git a/Common_ONE-PF.NUM.mlpe b/Common_ONE-PF.NUM.mlpe index d5d252e..be82943 100644 --- a/Common_ONE-PF.NUM.mlpe +++ b/Common_ONE-PF.NUM.mlpe @@ -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') diff --git a/Common_ONE-PF.mlpe b/Common_ONE-PF.mlpe index 59fc8e1..b0ee9c8 100644 --- a/Common_ONE-PF.mlpe +++ b/Common_ONE-PF.mlpe @@ -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 diff --git a/Essetre-PF.nge b/Essetre-PF.nge index ed340b7..a752ef3 100644 Binary files a/Essetre-PF.nge and b/Essetre-PF.nge differ