1
Mach4 General Discussion / Selectivly show toolpaths from subs
« on: November 30, 2016, 12:28:04 PM »
I have a set of 20 or so subroutines in separate files. I have a custom M code that pops up a message box to reposition a part and then the next subroutine is called. Different products use different combinations of the code in these subroutines to this set up makes it very easy to call what subs are needed for an individual product. This would also allow the code for one subroutine to be updated at some future time without having to rewrite the code for each product.
The gcode for one product might look like:
This set up works well except that the toolpath is generated for the gcode in all subs. The code in each sub is centered around (0,0) as the part is repositioned before each sub is called. This means that all the toolpaths for each sub are drawn over each other which does not hurt anything but looks messy.
I have been looking for a way to selectively show the toolpath for each sub but have not found anything that works.
Any thoughts or ideas? Thanks!
The gcode for one product might look like:
Code: [Select]
G20 G90 G91.1 G64 G40
( Start at tool change height)
G0 Z4.0
T1 M6
G17
( Engrave Position 1 )
M101
M98 P1000
M5
G0 Z4.0
( Engrave Position 2 )
M101
M98 P1001
M5
G0 Z4.0
(Done)
M30
This set up works well except that the toolpath is generated for the gcode in all subs. The code in each sub is centered around (0,0) as the part is repositioned before each sub is called. This means that all the toolpaths for each sub are drawn over each other which does not hurt anything but looks messy.
I have been looking for a way to selectively show the toolpath for each sub but have not found anything that works.
Any thoughts or ideas? Thanks!