Page 1 of 1

!CheckDone

Posted: Tue Aug 28, 2018 5:46 pm
by CNC_Machines
Greetings,

I am writing a C program that has multiple moves of an axis. I noticed in the examples that whenever there is a movement it is followed by a while loop to wait until motion is complete. I am wondering what would happen if I ignored the loop? If I command an axis to position A, and before it reaches position what if I change the command to position B? Will this foul something up, or will it just update and move to B instead of A?

The reason I ask is I have this in a forever loop and I dont want to lock it up with the !CheckDone while loop.

Thanks,

Scott

Re: !CheckDone

Posted: Tue Aug 28, 2018 6:16 pm
by TomKerekes
Hi Scott,

You can command a new Move/Jog while a previous Move/Jog is in progress. KFLOP will compute a blended motion toward the new command. However you may not command new Moves/Jogs continuously or KFLOP will be totally consumed with blending motions. Motions of at least 50ms should be allowed without changes at frequent intervals.

There are techniques of waiting for motions to finish within a loop while not blocking the loop. See this article.