Problem with the "while" loop?
-
Hi,
I've noticed something strange when using a while loop. After the first iteration, there's is a small waiting time. Is it normal ? Here's the code I used :
while iterations < 4
G1 X150 F10000 P0 -
@Anthoval I can't find any reference to a "P" parameter for G1 moves so that might be throwing it. https://duet3d.dozuki.com/Wiki/Gcode#Section_G0_G1_Move
On the other hand, how long is the pause? Might it simply be that any move will start at zero speed and have an acceleration phase, then at the end of the move decelerate down to zero speed before starting the next move?
-
@deckingman the "P" parameter is used to trigger an output for the whole movement.
The pause might be a "G4 P0" (wait the end of previous movement). When multiples movements are used in a row, there's no stop between every move. The acceleration occurs on the first G1 command, the deceleration only occurs on the last.
I feel like this pause is specific to the while loop, when iteration goes from 0 to 1. Though I have not tried to start the loop at iteration = 1, instead of 0 (if that's possible).
-
Are you running the Duet standalone or with attached SBC?
Which Duet and which firmware version are you using?
-
@Anthoval said in Problem with the "while" loop?:
@deckingman the "P" parameter is used to trigger an output for the whole movement.
Please explain how that works with your command (quote)
G1 X150 F10000 P0.
I can find no reference to that "P" parameter in the official documentation for G1 commands that I referenced.
-
I thought the P parameter for G1 commands was documented, but it seems not to be. I have just [re-]added it.