reference to the last used tool
-
Hi!. Im trying to make my scripts more "clean". My resume.g file is:
G92 E0
M568 P0 A2
M116 P0
G1 E5 F200
m98 P"/macros/clean_tool.g"
M400
G1 R1 X0 Y0 Z5 F6000
G1 R1 Z0
M83As you can see Im turning off tool 0. But I have 2 tools. So I noticed than if I make a psue when tool 1 is being used... it remainds ON,
So my question is: how can a make reference to the tool being used last when paused was started, in order to command in rsume.g to go off only the active last tool (the other one in theory is already off or at least in standby temp so it doesnt matter)
Thanks in advance
-
@Tinchus you could try to use a variable when you call for the tool and once you call another it returns 0?
-
@Tinchus use object model field state.currentTool to find which tool number is in use. If you released the tool in your pause.g file then I suggest that in pause.g you set a global variable to the value of state.tool when pause.g was entered.
-
@dc42 this is better ahahahah.
-
-
-