Parameters on toolchange
-
Hello everyone,
I'm trying to optimize the tool change and would like to make calling the clean and/or purge macros optional.
For the macros themselves this is easy to do with a parameter in the M98 P"0:/sys/purge0.g" call.But for the tool change called by T0 / T1 I did not manage to pass a parameter. Is there a way I am not seeing?
thanks for any hints and/or ideas.
-
@benecito You could set a global variable, and check that on tool change. See https://docs.duet3d.com/en/User_manual/Reference/Gcode_meta_commands#variables and https://docs.duet3d.com/en/User_manual/Reference/Gcode_meta_commands#variables-1 for global variable usage.
Ian
-
@droftarts Thanks!
It's an option yes, but quite a complicated one. If I have i.e. the purge option turned on for a print, but while preparing everything call the purge1 macro it will purge once because of the tool change and once because of the macro call. Not really elegant. Changing the global variable before calling the macro would be possible, but also not really elegant as there are quite a few occasions this would need to be done and another variable to store the state to switch back to afterwards would be needed.Any other ideas?
-
@benecito you could raise a feature request to allow parameters provided with the T command other than P to be passed through to the tool change files.
-
@dc42 I was hoping there would already be a way to do so. But thanks! I will create one.
-