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

More
7 years 4 months ago #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 to join the conversation.

More
7 years 4 months ago #137944 by rodw

Please Log in to join the conversation.

More
7 years 4 months ago #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 to join the conversation.

More
7 years 4 months ago #137952 by JetForMe
I'm just really nervous about this machine doing the right thing until I get everything perfected.

Please Log in to join the conversation.

More
7 years 4 months ago #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
Code:
G91 G1 Z0.0001 G90

Cheers, Phill.

Please Log in to join the conversation.

More
7 years 4 months ago #137959 by cmorley

JetForMe wrote: 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 to join the conversation.

More
7 years 4 months ago #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
Code:
# 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

Please Log in to join the conversation.

More
7 years 4 months ago #138042 by andypugh

JetForMe wrote: 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 to join the conversation.

More
7 years 4 months ago #138073 by JetForMe

andypugh wrote: 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 to join the conversation.

Time to create page: 0.153 seconds
Powered by Kunena Forum