Pausing program until spindle at speed?

Moderators: TomKerekes, dynomotion

Post Reply
Moray
Posts: 282
Joined: Thu Apr 26, 2018 10:16 pm

Pausing program until spindle at speed?

Post by Moray » Mon Dec 13, 2021 7:28 pm

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?

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Pausing program until spindle at speed?

Post by TomKerekes » Mon Dec 13, 2021 8:12 pm

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
Attachments
OnCWJogWait2.c
(1.27 KiB) Downloaded 57 times
Regards,

Tom Kerekes
Dynomotion, Inc.

Moray
Posts: 282
Joined: Thu Apr 26, 2018 10:16 pm

Re: Pausing program until spindle at speed?

Post by Moray » Mon Dec 13, 2021 8:19 pm

Thanks Tom.

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

Post Reply