What is the correct way to wait for motion in macro call?
Posted: Fri Aug 25, 2017 6:53 pm
Looking at the shared macros, I've seen them done in a few different ways:
a. exec.Code("G0 X0 Y0");
while (exec.IsMoving ()){}
exec.Wait (200);
Q: why wait after motion is completed?
b. exec.Callbutton(107);
while (exec.IsMoving ()){ exec.Wait(200); }
Q. why wait inside the loop? To avoid empty loop too many times?
c. exec.Code("G0 X0 Y0");
exec.Wait(200);
while (exec.IsMoving ()){}
Q. why wait before the loop? To avoid the next loop finished before the code is inserted into the motion buffer?
So, what's do you recommend and why? Thanks.
a. exec.Code("G0 X0 Y0");
while (exec.IsMoving ()){}
exec.Wait (200);
Q: why wait after motion is completed?
b. exec.Callbutton(107);
while (exec.IsMoving ()){ exec.Wait(200); }
Q. why wait inside the loop? To avoid empty loop too many times?
c. exec.Code("G0 X0 Y0");
exec.Wait(200);
while (exec.IsMoving ()){}
Q. why wait before the loop? To avoid the next loop finished before the code is inserted into the motion buffer?
So, what's do you recommend and why? Thanks.