From 4609f6154615ba7e2e42a64d8d9ccb5cd4da37f6 Mon Sep 17 00:00:00 2001 From: Marius Stanciu Date: Sun, 10 Feb 2019 23:36:59 +0200 Subject: [PATCH] - changes in Toolchange_Probe_MACH3 postprocessor file --- README.md | 1 + postprocessors/Toolchange_Probe_MACH3.py | 33 ++++++++++++------------ 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 3393ea7e..743b92f6 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ CAD program, and create G-Code for Isolation routing. - added a strong focus to the object_name entry in the Selected tab - the keypad keyPressed are now detected correctly - added a pause and message/warning to do a rough zero for the Z axis, in case of Toolchange_Probe_MACH3 postprocessor file +- changes in Toolchange_Probe_MACH3 postprocessor file 9.02.2019 diff --git a/postprocessors/Toolchange_Probe_MACH3.py b/postprocessors/Toolchange_Probe_MACH3.py index bb222781..6c0520be 100644 --- a/postprocessors/Toolchange_Probe_MACH3.py +++ b/postprocessors/Toolchange_Probe_MACH3.py @@ -79,6 +79,7 @@ class Toolchange_Probe_MACH3(FlatCAMPostProc): toolchangez = p.toolchangez toolchangexy = p.toolchange_xy f_plunge = p.f_plunge + gcode = '' if toolchangexy is not None: @@ -107,23 +108,23 @@ T{tool} M6 G00 Z{toolchangez} G00 X{toolchangex} Y{toolchangey} -(MSG, Change to Tool Dia = {toolC} ||| Drills for this tool = {t_drills} ||| Tool Probing MACH3) +(MSG, Change to Tool Dia = {toolC} ||| CONNECT THE PROBE ||| Drills for this tool = {t_drills}) M0 -G00 Z{z_move} F{feedrate_probe} G31 Z{z_pdepth} G92 Z0 -G00 Z{z_move} +G00 Z{z_in_between} F{feedrate_probe_slow} G31 Z{z_pdepth} G92 Z0 +G00 Z{z_move} (MSG, Remove any clips or other devices used for probing. CNC work is resuming ...) M0 -G00 Z{z_move} """.format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchangex), toolchangey=self.coordinate_format % (p.coords_decimals, toolchangey), toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez), z_move=self.coordinate_format % (p.coords_decimals, p.z_move), + z_in_between=self.coordinate_format % (p.coords_decimals, p.z_move / 2), feedrate_probe=str(self.feedrate_format %(p.fr_decimals, p.feedrate_probe)), feedrate_probe_slow=str(self.feedrate_format % (p.fr_decimals, (p.feedrate_probe / 2))), z_pdepth=self.coordinate_format % (p.coords_decimals, p.z_pdepth), @@ -136,21 +137,21 @@ M5 T{tool} M6 G00 Z{toolchangez} -(MSG, Change to Tool Dia = {toolC} ||| Drills for this tool = {t_drills} ||| Tool Probing MACH3) +(MSG, Change to Tool Dia = {toolC} ||| CONNECT THE PROBE ||| Drills for this tool = {t_drills}) M0 -G00 Z{z_move} F{feedrate_probe} G31 Z{z_pdepth} G92 Z0 -G00 Z{z_move} +G00 Z{z_in_between} F{feedrate_probe_slow} G31 Z{z_pdepth} G92 Z0 +G00 Z{z_move} (MSG, Remove any clips or other devices used for probing. CNC work is resuming ...) M0 -G00 Z{z_move} """.format(toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez), z_move=self.coordinate_format % (p.coords_decimals, p.z_move), + z_in_between=self.coordinate_format % (p.coords_decimals, p.z_move / 2), feedrate_probe=str(self.feedrate_format %(p.fr_decimals, p.feedrate_probe)), feedrate_probe_slow=str(self.feedrate_format % (p.fr_decimals, (p.feedrate_probe / 2))), z_pdepth=self.coordinate_format % (p.coords_decimals, p.z_pdepth), @@ -170,23 +171,23 @@ T{tool} M6 G00 Z{toolchangez} G00 X{toolchangex} Y{toolchangey} -(MSG, Change to Tool Dia = {toolC} ||| Tool Probing MACH3) +(MSG, Change to Tool Dia = {toolC} ||| CONNECT THE PROBE) M0 -G00 Z{z_move} F{feedrate_probe} G31 Z{z_pdepth} G92 Z0 -G00 Z{z_move} +G00 Z{z_in_between} F{feedrate_probe_slow} G31 Z{z_pdepth} G92 Z0 +G00 Z{z_move} (MSG, Remove any clips or other devices used for probing. CNC work is resuming ...) M0 -G00 Z{z_move} """.format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchangex), toolchangey=self.coordinate_format % (p.coords_decimals, toolchangey), toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez), z_move=self.coordinate_format % (p.coords_decimals, p.z_move), + z_in_between=self.coordinate_format % (p.coords_decimals, p.z_move / 2), feedrate_probe=str(self.feedrate_format %(p.fr_decimals, p.feedrate_probe)), feedrate_probe_slow=str(self.feedrate_format % (p.fr_decimals, (p.feedrate_probe / 2))), z_pdepth=self.coordinate_format % (p.coords_decimals, p.z_pdepth), @@ -198,21 +199,21 @@ M5 T{tool} M6 G00 Z{toolchangez} -(MSG, Change to Tool Dia = {toolC} ||| Tool Probing MACH3) +(MSG, Change to Tool Dia = {toolC} ||| CONNECT THE PROBE) M0 -G00 Z{z_move} F{feedrate_probe} G31 Z{z_pdepth} G92 Z0 -G00 Z{z_move} +G00 Z{z_in_between} F{feedrate_probe_slow} G31 Z{z_pdepth} G92 Z0 +G00 Z{z_move} (MSG, Remove any clips or other devices used for probing. CNC work is resuming ...) M0 -G00 Z{z_move} """.format(toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez), z_move=self.coordinate_format % (p.coords_decimals, p.z_move), + z_in_between=self.coordinate_format % (p.coords_decimals, p.z_move / 2), feedrate_probe=str(self.feedrate_format %(p.fr_decimals, p.feedrate_probe)), feedrate_probe_slow=str(self.feedrate_format % (p.fr_decimals, (p.feedrate_probe / 2))), z_pdepth=self.coordinate_format % (p.coords_decimals, p.z_pdepth),