- adjusted the postprocessor files so the Spindle Off command (M5) is done before the move to Toolchange Z

- adjusted the Toolchange Manual postprocessor file to have more descriptive messages on the toolchange event
This commit is contained in:
Marius Stanciu
2019-02-10 13:42:22 +02:00
committed by Marius S
parent f35994a712
commit f01ac4483a
8 changed files with 78 additions and 51 deletions

View File

@@ -98,9 +98,9 @@ class Toolchange_Probe_MACH3(FlatCAMPostProc):
no_drills = i[2]
if toolchangexy is not None:
gcode = """
gcode = """
M5
T{tool}
M5
M6
G00 Z{toolchangez}
G00 X{toolchangex} Y{toolchangey}
@@ -129,8 +129,8 @@ G00 Z{z_move}
toolC=toolC_formatted)
else:
gcode = """
T{tool}
M5
T{tool}
M6
G00 Z{toolchangez}
(MSG, Change to Tool Dia = {toolC} ||| Drills for this tool = {t_drills} ||| Tool Probing MACH3)
@@ -162,8 +162,8 @@ G00 Z{z_move}
else:
if toolchangexy is not None:
gcode = """
T{tool}
M5
T{tool}
M6
G00 Z{toolchangez}
G00 X{toolchangex} Y{toolchangey}
@@ -191,8 +191,8 @@ G00 Z{z_move}
toolC=toolC_formatted)
else:
gcode = """
T{tool}
M5
T{tool}
M6
G00 Z{toolchangez}
(MSG, Change to Tool Dia = {toolC} ||| Tool Probing MACH3)

View File

@@ -97,9 +97,9 @@ class Toolchange_Probe_general(FlatCAMPostProc):
if toolchangexy is not None:
gcode = """
M5
G00 X{toolchangex} Y{toolchangey}
T{tool}
M5
M6
(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
M0
@@ -111,8 +111,8 @@ M0
else:
gcode = """
T{tool}
M5
T{tool}
M6
(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
M0
@@ -127,9 +127,9 @@ M0
else:
if toolchangexy is not None:
gcode = """
M5
G00 X{toolchangex} Y{toolchangey}
T{tool}
M5
M6
(MSG, Change to Tool Dia = {toolC})
M0
@@ -139,8 +139,8 @@ M0
toolC=toolC_formatted)
else:
gcode = """
T{tool}
M5
T{tool}
M6
(MSG, Change to Tool Dia = {toolC})
M0""".format(tool=int(p.tool),

View File

@@ -100,15 +100,18 @@ class Toolchange_manual(FlatCAMPostProc):
no_drills = i[2]
if toolchangexy is not None:
gcode = """G00 Z{toolchangez}
T{tool}
M5
gcode = """
M5
G00 Z{toolchangez}
T{tool}
G00 X{toolchangex} Y{toolchangey}
(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
M0
G01 Z0
(MSG, Adjust the tool T{tool} to touch the material and then tighten it slightly.)
M0
G00 Z{toolchangez}
(MSG, Now the tool can be tightened more securely.)
M0
""".format(toolchangex=self.coordinate_format%(p.coords_decimals, toolchangex),
toolchangey=self.coordinate_format%(p.coords_decimals, toolchangey),
@@ -118,14 +121,17 @@ M0
toolC=toolC_formatted)
else:
gcode = """G00 Z{toolchangez}
T{tool}
M5
gcode = """
M5
G00 Z{toolchangez}
T{tool}
(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
M0
G01 Z0
(MSG, Adjust the tool T{tool} to touch the material and then tighten it slightly.)
M0
G00 Z{toolchangez}
(MSG, Now the tool can be tightened more securely.)
M0
""".format(
toolchangez=self.coordinate_format%(p.coords_decimals, toolchangez),
@@ -139,15 +145,18 @@ M0
else:
if toolchangexy is not None:
gcode = """G00 Z{toolchangez}
T{tool}
gcode = """
M5
G00 Z{toolchangez}
T{tool}
G00 X{toolchangex}Y{toolchangey}
(MSG, Change to Tool Dia = {toolC})
M0
G01 Z0
(MSG, Adjust the tool T{tool} to touch the material and then tighten it slightly.)
M0
G00 Z{toolchangez}
(MSG, Now the tool can be tightened more securely.)
M0
""".format(toolchangex=self.coordinate_format%(p.coords_decimals, toolchangex),
toolchangey=self.coordinate_format%(p.coords_decimals, toolchangey),
@@ -155,14 +164,17 @@ M0
tool=int(p.tool),
toolC=toolC_formatted)
else:
gcode = """G00 Z{toolchangez}
T{tool}
gcode = """
M5
G00 Z{toolchangez}
T{tool}
(MSG, Change to Tool Dia = {toolC})
M0
G01 Z0
(MSG, Adjust the tool T{tool} to touch the material and then tighten it slightly.)
M0
G00 Z{toolchangez}
(MSG, Now the tool can be tightened more securely.)
M0
""".format(toolchangez=self.coordinate_format%(p.coords_decimals, toolchangez),
tool=int(p.tool),

View File

@@ -98,10 +98,11 @@ class default(FlatCAMPostProc):
no_drills = i[2]
if toolchangexy is not None:
gcode = """G00 Z{toolchangez}
gcode = """
M5
G00 Z{toolchangez}
G00 X{toolchangex} Y{toolchangey}
T{tool}
M5
M6
(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchangex),
@@ -111,9 +112,10 @@ M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchange
t_drills=no_drills,
toolC=toolC_formatted)
else:
gcode = """G00 Z{toolchangez}
gcode = """
M5
G00 Z{toolchangez}
T{tool}
M5
M6
(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
M0""".format(toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez),
@@ -126,10 +128,11 @@ M0""".format(toolchangez=self.coordinate_format % (p.coords_decimals, toolchange
else:
if toolchangexy is not None:
gcode = """G00 Z{toolchangez}
gcode = """
M5
G00 Z{toolchangez}
G00 X{toolchangex} Y{toolchangey}
T{tool}
M5
M6
(MSG, Change to Tool Dia = {toolC})
M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchangex),
@@ -138,9 +141,10 @@ M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchange
tool=int(p.tool),
toolC=toolC_formatted)
else:
gcode = """G00 Z{toolchangez}
T{tool}
gcode = """
M5
G00 Z{toolchangez}
T{tool}
M6
(MSG, Change to Tool Dia = {toolC})
M0""".format(toolchangez=self.coordinate_format%(p.coords_decimals, toolchangez),

View File

@@ -97,10 +97,11 @@ class grbl_11(FlatCAMPostProc):
no_drills = i[2]
if toolchangexy is not None:
gcode = """G00 Z{toolchangez}
gcode = """
M5
G00 Z{toolchangez}
G00 X{toolchangex} Y{toolchangey}
T{tool}
M5
M6
(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchangex),
@@ -110,9 +111,10 @@ M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchange
t_drills=no_drills,
toolC=toolC_formatted)
else:
gcode = """G00 Z{toolchangez}
gcode = """
M5
G00 Z{toolchangez}
T{tool}
M5
M6
(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
M0""".format(toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez),
@@ -126,11 +128,12 @@ M0""".format(toolchangez=self.coordinate_format % (p.coords_decimals, toolchange
else:
if toolchangexy is not None:
gcode = """G00 Z{toolchangez}
G00 X{toolchangex} Y{toolchangey}
gcode = """
M5
G00 Z{toolchangez}
G00 X{toolchangex} Y{toolchangey}
T{tool}
M5
M6
M6
(MSG, Change to Tool Dia = {toolC})
M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchangex),
toolchangey=self.coordinate_format % (p.coords_decimals, toolchangey),
@@ -138,10 +141,11 @@ M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchange
tool=int(p.tool),
toolC=toolC_formatted)
else:
gcode = """G00 Z{toolchangez}
gcode = """
M5
G00 Z{toolchangez}
T{tool}
M5
M6
M6
(MSG, Change to Tool Dia = {toolC})
M0""".format(toolchangez=self.coordinate_format%(p.coords_decimals, toolchangez),
tool=int(p.tool),

View File

@@ -110,9 +110,10 @@ class line_xyz(FlatCAMPostProc):
for i in p['options']['Tools_in_use']:
if i[0] == p.tool:
no_drills = i[2]
gcode = """G00 X{toolchangex} Y{toolchangey} Z{toolchangez}
gcode = """
M5
G00 X{toolchangex} Y{toolchangey} Z{toolchangez}
T{tool}
M5
M6
(MSG, Change to Tool Dia = {toolC} ||| Total drills for tool T{tool} = {t_drills})
M0""".format(toolchangex=self.coordinate_format%(p.coords_decimals, toolchangex),
@@ -129,9 +130,10 @@ M0""".format(toolchangex=self.coordinate_format%(p.coords_decimals, toolchangex)
z_move=self.coordinate_format % (p.coords_decimals, p.z_move))
return gcode
else:
gcode = """G00 X{toolchangex} Y{toolchangey} Z{toolchangez}
T{tool}
gcode = """
M5
G00 X{toolchangex} Y{toolchangey} Z{toolchangez}
T{tool}
M6
(MSG, Change to Tool Dia = {toolC})
M0""".format(toolchangex=self.coordinate_format%(p.coords_decimals, toolchangex),

View File

@@ -98,10 +98,11 @@ class marlin(FlatCAMPostProc):
no_drills = i[2]
if toolchangexy is not None:
gcode = """G0 Z{toolchangez}
gcode = """
M5
G0 Z{toolchangez}
G0 X{toolchangex} Y{toolchangey}
T{tool}
M5
M6
;MSG, Change to Tool Dia = {toolC}, Total drills for tool T{tool} = {t_drills}
M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchangex),
@@ -111,9 +112,10 @@ M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchange
t_drills=no_drills,
toolC=toolC_formatted)
else:
gcode = """G0 Z{toolchangez}
T{tool}
gcode = """
M5
G0 Z{toolchangez}
T{tool}
M6
;MSG, Change to Tool Dia = {toolC}, Total drills for tool T{tool} = {t_drills}
M0""".format(toolchangez=self.coordinate_format % (p.coords_decimals, toolchangez),
@@ -127,10 +129,11 @@ M0""".format(toolchangez=self.coordinate_format % (p.coords_decimals, toolchange
else:
if toolchangexy is not None:
gcode = """G0 Z{toolchangez}
gcode = """
M5
G0 Z{toolchangez}
G0 X{toolchangex} Y{toolchangey}
T{tool}
M5
M6
;MSG, Change to Tool Dia = {toolC}
M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchangex),
@@ -139,9 +142,10 @@ M0""".format(toolchangex=self.coordinate_format % (p.coords_decimals, toolchange
tool=int(p.tool),
toolC=toolC_formatted)
else:
gcode = """G0 Z{toolchangez}
T{tool}
gcode = """
M5
G0 Z{toolchangez}
T{tool}
M6
;MSG, Change to Tool Dia = {toolC}
M0""".format(toolchangez=self.coordinate_format%(p.coords_decimals, toolchangez),