Closed ex-nerd closed 2 years ago
If I understand you, this is working but is not optimal. Unfortunately, PostProcessAll looks at each line by itself to find the ending marker, so there's no easy way to have it look at a sequence of several lines.
If you have any programming experience (you know "regex"!), then your best bet might be editing the post processor itself to not emit the X-Y home. You did not mention what post processor you're using so I can't offer specific suggestions.
I was poking around the gcode output from this script (and the new F360) in comparison with some older multi-toolpath exports that I still have sitting around.
This is the transition point currently output from this script (with the "gcode that mark ending sequence" set to
M30
, which is all the post-processor sets), with that loneM5
being everything I think I need to add for my shapeoko3's toolchange functionality (which will either prompt the user to turn off the spindle, or actually turn it off if they have the proper hardware):Compare this to a similar transition from an older F360 (and startup license) that supported multi-tool exports:
The actual ending sequence used by my post-processor looks something like this:
It looks like what I'd want that "ending sequence" setting to be is
G28 G91 Z0;G90;G28 G91 X0 Y0;G90
(or rather, a regex that would actually match the newlines) rather than simply looking forM30
. Unfortunately, my reading of the docs is that the current matching technique is "any one of these individual gcodes" so I couldn't even match that longerG28 G91 X0 Y0
(which also happens to occur at the beginning of the file, so maybe isn't the best match).If there was a way to catch the "ending sequence" using a pattern, or even just a longer string, it would allow replacing the entire ending sequence, especially that very annoying
G28 G91 X0 Y0
that remains in place even between same-tool toolpaths (unnecessarily sending the carriage to the back left corner between the joined files), but also turn off the spindle sooner as a slight improvement in safety.