array not setting correctly from variables.
-
Hi,
I want to use a macro to set probing boundaries and point spacing with the M557 command.
I am using the param.X function in macro's to create variables for Xmin, Xmax, Ymin and Ymax of the print area and set the point density.
However, if I try to put the parameters in the M557 command, I get the error;
"Error; in file macro line 81: M557: Wrong number of values in array, expected 2"The line I use to put the variables in the M557 command is;
M557 X{var.printxmin}:{var.printxmax} Y{var.printymin}:{var.printymax} P{var.pointsx}:{var.pointsy}
I have checked the variables with "echo var.printxmin" which it reports correctly.
Why doesn't it put the variables correctly in the arrays?
-
Why doesn't it put the variables correctly in the arrays?
It might help to study the GCode meta commands. In the section „Use of expressions within GCode commands“, exactly your case is demonstrated with an example (and why your expression would have worked with RRF 3.2 back then). From the documentation:
If 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> ... }
-
-
-
-