More control over waiting for the spindle to come up to speed?

More
26 Jun 2019 22:26 #137936 by JetForMe
I was able to get linuxcnc to wait for the spindle to come up to speed using spindle.0.at-speed, but this only causes it to wait before doing a feed move. Moreover, since my at-speed input is based on the VFD's output frequency and not the actual spindle speed, I'd like to introduce a delay of a second or two after the input asserts to ensure the spindle is all the way up to speed.

Also, is there any way to delay rapids, as well, until the spindle is up to speed?

Since I probably want to ensure the spindle-stopped input also gives the spindle time to come to a complete stop, maybe the best way to handle this is to add some kind of delay to the two inputs. Perhaps timedelay is the way to do this?

Please Log in or Create an account to join the conversation.

More
27 Jun 2019 00:42 - 27 Jun 2019 00:43 #137944 by rodw
Last edit: 27 Jun 2019 00:43 by rodw.

Please Log in or Create an account to join the conversation.

More
27 Jun 2019 02:09 #137949 by cmorley
it is unusual to wait for a spindle to come up to speed before a rapid move - why do you wish this? You could surely do this with HAL plumbing using feed-inhibit while rapiding.


Chris M

Please Log in or Create an account to join the conversation.

More
27 Jun 2019 02:47 #137952 by JetForMe
I'm just really nervous about this machine doing the right thing until I get everything perfected.

Please Log in or Create an account to join the conversation.

More
27 Jun 2019 04:12 #137953 by phillc54

Also, is there any way to delay rapids, as well, until the spindle is up to speed?

You could use a very small relative move to cause it to wait
G91
G1 Z0.0001
G90

Cheers, Phill.

Please Log in or Create an account to join the conversation.

More
27 Jun 2019 05:30 #137959 by cmorley

I'm just really nervous about this machine doing the right thing until I get everything perfected.


That's what rapid, feed and spindle override is for.

Chris M

Please Log in or Create an account to join the conversation.

More
27 Jun 2019 06:30 #137964 by pl7i92
why dont you ramp up the spindle
SOFT START
then you can be shure it is almost at the speed
as spindle at speed will acoor later and the vfd will get up slow
# load real time a limit2 and a near with names so it is easier to follow
loadrt limit2 names=spindle-ramp
loadrt near names=spindle-at-speed

# add the functions to a thread
addf spindle-ramp servo-thread
addf spindle-at-speed servo-thread

# set the parameter for max rate-of-change
# (max spindle accel/decel in units per second)
setp spindle-ramp.maxv 60

# hijack the spindle speed out and send it to spindle ramp in
net spindle-cmd <= motion.spindle-speed-out => spindle-ramp.in

# the output of spindle ramp is sent to the scale in
net spindle-ramped <= spindle-ramp.out => scale.0.in

# to know when to start the motion we send the near component
# (named spindle-at-speed) to the spindle commanded speed from
# the signal spindle-cmd and the actual spindle speed
# provided your spindle can accelerate at the maxv setting.
net spindle-cmd => spindle-at-speed.in1
net spindle-ramped => spindle-at-speed.in2

# the output from spindle-at-speed is sent to motion.spindle-at-speed
# and when this is true motion will start
net spindle-ready <= spindle-at-speed.out => motion.spindle-at-speed
The following user(s) said Thank You: JetForMe

Please Log in or Create an account to join the conversation.

More
27 Jun 2019 22:57 #138042 by andypugh

Moreover, since my at-speed input is based on the VFD's output frequency and not the actual spindle speed, I'd like to introduce a delay of a second or two after the input asserts to ensure the spindle is all the way up to speed.


Do you have a spindle encoder? Even a single ppr encoder could be used to bypass this. (and it would catch more problems, too, like when I left my gearbox in neutral last weekend before starting the cycle.)

Please Log in or Create an account to join the conversation.

More
28 Jun 2019 01:18 #138073 by JetForMe

Do you have a spindle encoder? Even a single ppr encoder could be used to bypass this. (and it would catch more problems, too, like when I left my gearbox in neutral last weekend before starting the cycle.)


Alas, if I did, this would be easier.

Please Log in or Create an account to join the conversation.

Time to create page: 0.197 seconds
Powered by Kunena Forum