Ver Fonte

- 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

Marius Stanciu há 7 anos atrás
pai
commit
f01ac4483a

+ 2 - 1
README.md

@@ -14,7 +14,8 @@ CAD program, and create G-Code for Isolation routing.
 - the SELECTED type of messages are no longer printed to shell from 2 reasons: first, too much spam and second, issue with displaying html
 - on set_zero function and creation of new geometry or new excellon there is no longer a zoom fit 
 - repurposed shortcut key 'Delete' to delete tools in tooltable when the mouse is over the Seleted tab (with Geometry inside) or in Tools tab (when NCC Tool or Paint Tool is inside). Or in Excellon Editor when mouse is hovering the Selected tab selecting a tool, 'Delete' key will delete that tool, if on canvas 'Delete' key will delete a selected shape (drill). In rest, will delete selected objects.
-
+- 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
 
 9.02.2019
 

+ 5 - 5
postprocessors/Toolchange_Probe_MACH3.py

@@ -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)

+ 4 - 4
postprocessors/Toolchange_Probe_general.py

@@ -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),

+ 22 - 10
postprocessors/Toolchange_manual.py

@@ -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),

+ 12 - 8
postprocessors/default.py

@@ -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),

+ 15 - 11
postprocessors/grbl_11.py

@@ -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),

+ 6 - 4
postprocessors/line_xyz.py

@@ -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),

+ 12 - 8
postprocessors/marlin.py

@@ -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),