Possible bug (RRF3.5.1): M208 throws error when used with array
-
In order to make axis limits tool-dependent (see here), i wanted to define the X and U limits on my IDEX printer as follows:
; config.g if !exists(global.X_Limit) global X_Limit = {-175.5,151} ; X limits if !exists(global.U_Limit) global U_Limit = {-151,175.5} ; U limits ;[...] M208 X{global.X_Limit[0]}:{global.X_Limit[1]} Y-101:101 Z0:209 U{global.U_Limit[0]}:{global.U_Limit[1]}
That resulted in the error "M208: U axis maximum must be greater than minimum".
The same happens if I define only the U or the X values to shorten the command.
If I use the old separate notation however...
M208 S0 X{global.X_Limit[1]} Y101 Z209 U{global.U_Limit[1]} M208 S1 X{global.X_Limit[0]} Y-101 Z0 U{global.U_Limit[0]}
...it works as it should, except that the variables are not replaced by their values in the console output.
Can anyone confirm this behaviour?
-
@NeoDue There has been a change to the way that expressions are used as parameters with array type in GCode commands. Now the entire parameter must be either a colon-separated list of literal values, or an expression of array type. Try this:
M208 X{global.X_Limit[0], global.X_Limit[1]} Y-101:101 Z0:209 U{global.U_Limit[0], global.U_Limit[1]}
-
@dc42 Thanks, that one works as intended
-
-
-
@NeoDue I have now added this change to the upgrade notes at https://github.com/Duet3D/RepRapFirmware/wiki/Changelog-RRF-3.x#reprapfirmware-351-stable-changes-since-346.