Conditional commands in macro
-
Hi all,
I'm trying to get a conditional move command into a tool change macro, as with X being over 195 it will crash the lever into the actual tool change tab (ultimaker 3 style).For this I have the following command, yet whatever I try I cannot seems to get it right (as I keep getting a "Bad command" message
-
Put it in {} brackets.
soif {move.axes[0].machinePosition > 195}
and then carry on as you were
-
I tried, yet I still get the error and lines 2 and 3 are executed even when X<195
-
You don't need to use { } in that command. What version of RRF are you using?
-
what happens when you send:
echo move.axes[0].machinePosition
You can also add that to the command to check things are working as expected:
if move.axes[0].machinePosition > 195.0 echo move.axes[0].machinePosition G90 G0 X196 Y175 G90 ....
Also if you are still having issues please post the macro text here (not an image)
-
Currently I am using RepRapFirmware for Duet 2 WiFi/Ethernet 2.03 (2019-06-13b2). Beginner's mistake here i guess to assume I used 3.2.2 (but it was only the Duet WEb Control 3.2.2)...
@T3P3Tony sending that command trhough the console gives me back the same "Bad command" message.
-
@Madtraxx yes, you need to upgrade to RRF3 to use conditional gcode
-
I changed to DFF v3 and changed the needed config lines to make my printer operational again.
Running "echo move.axes[0].machinePosition" in the console I still get the following:
Also changing the macro to the code that @T3P3Tony mentioned also didn't seem to work.
-
@Madtraxx is that 3.2? I ask because normally the upgrade is 2.5.1 ->3.0 ->3.1.1 or later as long as you are on 3.1.1 or later that command should work
I know i said RRF3 before I should have said RRF3.x (at least 3.1.1)
-
Flashing the correct firmware this time (>3.3.1) has resolved the issue. Thanks for all the information!