@dc42 Thanks a lot for answering. Ok copied for the abs command. I will try to upgrade my board to RFF3.4 then...
Would you have any tips about question1:
Question1: Do I need to redefine stepper data (like acceleration, step/mm and so) at each time?
Posts made by Arno91
-
RE: Meta command type of variable
-
RE: Meta command type of variable
@owend Thanks for answering. Actually there is 1 tool selected. If I compute the command with echo instead of M584, it works...
Another interesting fact:var activeDriver = {abs(move.extruders[state.currentTool].driver)}
produce an error: "meta command: expected numeric operand". Thus the result of a command is a string. Is there a way to cast it to a int?
-
Meta command type of variable
Hello
I am trying to configure a multi filament divider including a switch whose purpose is to check if the previous filament has been correctly unloaded before loading the next one (I had issues already).
Conditional GCode is my friend no problem. But now I am trying to load the filament until reaching that switch. For that, I am using a fictive axis U. Here is my GCODE:M18 U ; disable the steppers linked to U that we are going to reassign M584 U3 ; assign axis U to driver 3 (extruder E0) M350 U16 I1 ; configure microstepping with interpolation M92 U400 ; set steps per mm M566 U150.00 ; set maximum instantaneous speed changes (mm/min) M203 U1200.00 ; set maximum speeds (mm/min) M201 U250.00 ; set accelerations (mm/s^2) M906 U800 I30 ; set motor currents (mA) and motor idle factor in per cent M208 U800 S0 ; set U axis maximum value M574 U2 S1 P"^!e0stop" ; configure active-low (S0) endstop for high end (U2) on U axis G91 ; relative moves G92 U0 ; force U to 0mm G1 U800 H1 F3000 ; feed filament to filament sensor G92 U0 ; force U to 0mm
This seem an ugly solution but it works. For now I need a macro like this for each driver.
Question1: Do I need to redefine stepper data (like acceleration, step/mm and so) at each time?
Question2: is there another solution more elegant for achieving this?
Question3: I want this macro to use the active extruder without to specify it explicitly. For that , I tried to use OM variable. For example, I replaced the 1st M594 gcode with:M584 U{move.extruders[state.currentTool].driver}
Problem: I got an error message "M584: expected non negative integer value". I suspect that
move.extruders[state.currentTool].driver returns a string data... How to workaround this?Thanks a lot for your help
PS: I am running DUET 2 on RFF3.3