Page 1 of 1

Pausing program until spindle at speed?

Posted: Mon Dec 13, 2021 7:28 pm
by Moray
I've recently sold my Cyclone lathe, but the new owner has asked is it possible to have code paused until the spindle is at speed.

The lathe uses the SpindleJog example modified a bit, but is there an easy way to compare the existing speed to the set jogging speed?
The spindle is quite slow to respond, so some speed changes can take a couple seconds.

I know all I need to do is create a blocking loop in the CW/CCW/jog programs, and have KMotion set to Exec/Wait, but I'm struggling to work out the best way to calculate the set speed has been reached, or possibly reached 90% of the commanded speed.

Any suggestions?

Re: Pausing program until spindle at speed?

Posted: Mon Dec 13, 2021 8:12 pm
by TomKerekes
Hi Moray,

See the attached example which checks last_vel. This example waits for the commanded speed (not necessarily actual) to be withing 10% of desired.

HTH

Re: Pausing program until spindle at speed?

Posted: Mon Dec 13, 2021 8:19 pm
by Moray
Thanks Tom.

I'll get that added to the modified files for the lathe, and get the new owner to try it.