Bug: Using variables for multiple extruders does not work
-
Just discovered this bug today while trying to extrude values based on several variables.
My setup is MB6HC + SBC running RRF, DSF and DWC versions 3.3rc1 for all.global extruder1val = 10 global extruder2val = 15 ;for a tool with two extruders G0 E{global.extruder1val}:{global.extruder2val}
The G0 (also tried G1) command only works for the first extruder, the command gives no errors and on the dashboard only the value for extruder 1 increases.
Same applies to to the following:G0 E5:{global.extruder2val} ;only 1st extruder moves G0 E0:{global.extruder2val} ;only 1st extruder moves G10 P0 X10 ;the current tool with two extruders echo tools[0].offsets[0] ;returns 10 G0 E5:{tools[0].offsets[0]} ;only 1st extruder moves
I wonder if this is a bug in the way commands with colons are parsed if they contain expressions?
For the time being can anyone think of a workaround that would allow simultaneous extrusion based on variable, parameter or any expression?
Update: For now I can use extra axes but would still like this functionality in the future.
I see in this thread a similar issue, but @dc42 mentions it will be solved in 3.3?
https://forum.duet3d.com/topic/20788/m572-s-d-parameter-doesn-t-process-expressions/5
At this point just wondering what the status of this fix is
Thanks,
T -
@tristanryerparke
I was wondering how your tools are set up? AFAIK, only the extruder of the active tool can be addressed.
If you have it set up as mixing tool, you would have to tinker with the mixing ratio instead of addressing both extruders with their own extrusion length. -
@tristanryerparke Have you checked that you can address two extruders without the complication of variables? So for instance in your first example does
G0 E10:15
Do what you expect it to do?
-
@tristanryerparke there is currently the following limitation in SBC mode. A parameter taking two or more colon-separate values cannot use expressions to provide those values. So G0 E{global.extruder1val} will work, but G0 E{global.extruder1val}:{global.extruder2val} will not.
We plan to introduce array-valued expressions in a future firmware release (possibly in 3.4). At that point it will become possible to use a different syntax, probably G0 E{[global.extruder1val,global.extruder2val]}.
-
@gloomyandy yes sending G0 E100:200 works perfectly, extruding the specified amount on each extruder.