Stop feed when spindle rpm lower
- Artur_1617
-
Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 157
- Thank you received: 5
21 Aug 2025 13:25 #333759
by Artur_1617
Stop feed when spindle rpm lower was created by Artur_1617
Hi,
I looking for something can stop feed when spindle rpm is lower what is setup in G code S300 for example -15% and start feed when rpm back to S300.
I looking for something can stop feed when spindle rpm is lower what is setup in G code S300 for example -15% and start feed when rpm back to S300.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18945
- Thank you received: 5269
21 Aug 2025 13:49 - 21 Aug 2025 13:50 #333760
by PCW
Replied by PCW on topic Stop feed when spindle rpm lower
This is normally what motion.spindle-at-speed is used for.
LinuxCNC checks motion.spindle-at-speed after the
spindle speed has changed in the Gcode and pauses
the first cutting move after the spindle speed change until
motion.spindle-at-speed is true.
If you have a way to read the spindle speed, usually the
"near" hal component is used to generate the spindle-at-speed
signal. This can also be done if the spindle drive has a signal to report
that is is at speed.
Note that this will not work if you want to stop or alter the feed rate
if the spindle slows during operation, as motion.spindle-at-speed is ignored
after the first cutting move that follows a spindle speed change.
If you need to alter or stop the feed if the spindle speed drops during operation,
you would need to use adaptive feed (motion.adaptive-speed) and some hal math
or logic.
LinuxCNC checks motion.spindle-at-speed after the
spindle speed has changed in the Gcode and pauses
the first cutting move after the spindle speed change until
motion.spindle-at-speed is true.
If you have a way to read the spindle speed, usually the
"near" hal component is used to generate the spindle-at-speed
signal. This can also be done if the spindle drive has a signal to report
that is is at speed.
Note that this will not work if you want to stop or alter the feed rate
if the spindle slows during operation, as motion.spindle-at-speed is ignored
after the first cutting move that follows a spindle speed change.
If you need to alter or stop the feed if the spindle speed drops during operation,
you would need to use adaptive feed (motion.adaptive-speed) and some hal math
or logic.
Last edit: 21 Aug 2025 13:50 by PCW.
The following user(s) said Thank You: Artur_1617
Please Log in or Create an account to join the conversation.
- Henk
- Offline
- Platinum Member
-
Less
More
- Posts: 404
- Thank you received: 92
22 Aug 2025 18:56 #333780
by Henk
Replied by Henk on topic Stop feed when spindle rpm lower
I always impliment the following on my retrofits.
set up a spindle-at-speed signal in the usual way using encoder feedback and a near component.
invert it using a not component to set up a spindle-not-at-speed signal a d tie it to motion.feed-inhibit.
this will stop all motion when the spindle is not near enough to the commanded speed.
henk
set up a spindle-at-speed signal in the usual way using encoder feedback and a near component.
invert it using a not component to set up a spindle-not-at-speed signal a d tie it to motion.feed-inhibit.
this will stop all motion when the spindle is not near enough to the commanded speed.
henk
The following user(s) said Thank You: PCW, tommylight, Artur_1617
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 18945
- Thank you received: 5269
22 Aug 2025 19:47 #333782
by PCW
Replied by PCW on topic Stop feed when spindle rpm lower
That's simpler than my solution using adaptive feed.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- Artur_1617
-
Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 157
- Thank you received: 5
29 Aug 2025 04:33 - 29 Aug 2025 16:11 #334074
by Artur_1617
Replied by Artur_1617 on topic Stop feed when spindle rpm lower
My working setup...
loadrt not count=1
addf near.1 servo-thread
addf not.0 servo-thread
net spindle-vel-cmd-rpm => near.1.in1
net spindle-fb-rpm-abs-filtered => near.1.in2
net spindle-at-speed spindle.0.at-speed <= near.1.out
setp near.1.scale 1.3
#setp near.1.difference 20
net spindle-at-speed => not.0.in
net spindle-not-at-speed => not.0.out
net spindle-not-at-speed => motion.feed-inhibit
loadrt not count=1
addf near.1 servo-thread
addf not.0 servo-thread
net spindle-vel-cmd-rpm => near.1.in1
net spindle-fb-rpm-abs-filtered => near.1.in2
net spindle-at-speed spindle.0.at-speed <= near.1.out
setp near.1.scale 1.3
#setp near.1.difference 20
net spindle-at-speed => not.0.in
net spindle-not-at-speed => not.0.out
net spindle-not-at-speed => motion.feed-inhibit
Last edit: 29 Aug 2025 16:11 by Artur_1617.
Please Log in or Create an account to join the conversation.
Time to create page: 0.062 seconds