M208 and variables
-
Using 3.4.6 on a Mini:
I cannot figure out how to use variables in a M208 command.
I was testing something like this:
var ymin = -120
var ymax = 100M208 Y{var.ymin}:{var.ymax}
which gives this error message:
Error: Y axis maximum must be greater than minimum
Using the values directly in M208 work fine and using the vars one at a time with the M208 S parameter works fine but I don't normally use the S parameter.
Any ideas?
Thanks, Frederick
-
@fcwilt see the documentation here:
https://docs.duet3d.com/en/User_manual/Reference/Gcode_meta_commands#use-of-expressions-within-gcode-commandsf a parameter of a G- or M-command requires multiple values and you want to use expressions for some or all of them, then when using RRF 3.3 and later the parameter must be expressed like this:
{ <expression_1>, <expression_2>, <expression_3> ... }
so use:
M208 Y{var.ymin,var.ymax} -
That works just fine.
It might help if that sort of information appeared in the online GCode Dictionary where appropriate, such as in the entry for the M208 command.
Thanks much.
Frederick
-
@fcwilt i will pass that on to @droftarts