Alternative to variable substitution of parameter letter
-
Third idea: What if I create a virtual axis and map it onto the desired stepper just before using it in a macro?
UPDATE: @dc42 What if the G[0/1/2/3] commands had a new parameter that allowed mentioning the axis by string? For example, G1 Q"x150 y100" F2400 ?
The documentation right now says "Using an expression to replace a parameter latter, or to replace the command number after the initial G or M, is not supported. (so for example G1 {global.extruder_axis}^2 is not supported)"
Might this change soon? My use case is I have two nozzle wiper tools and instead of duplicating the gcode for each tool (with some minor tool-specific code included) I could use a variable to specify the stepper intended.
Thanks!
-
@dc42 Maybe the best of the ideas so far
implement something like this:
command "G1 X150 Y100 F24000" or command "G1 " ^ var.something
so that a string can be passed to the parser for execution. I don't think it's much different than calling a macro file, where the difference is that the command is in a passed string vs in a named file. It allows one to build a string conditionally and then send it to be executed.
What do you think?
-
Hi,
Would it be possible to change the mapping for a given axis to one of two steppers?
Frederick
-
@fcwilt I don't know. There is underlying housekeeping that the firmware must be doing. The drive mapping could be changed but I don't know whether that would be sufficient.