Adaptive Feed Rate HAL example?
- Mars
- Offline
- New Member
-
Less
More
- Posts: 9
- Thank you received: 1
19 Aug 2025 20:25 #333698
by Mars
Adaptive Feed Rate HAL example? was created by Mars
I am only a week or so into LinuxCNC so please bear with me. My ultimate goal is to use it for a wire EDM machine. I have been able to get a simple XYZ "machine" running on Raspberry Pi 5 using the GPIO driving some LEDs that simulate step/dir signals to real stepper drivers. My next goal is to add a signal input that will be used to control adaptive feed rate...ultimately to use it to back up the EDM stages when a short circuit is sensed. I want to start slow...a single GPIO input bit sends a -1 value when asserted to command the reverse. Does anyone know of a example HAL file that has includes adaptive feed setup? TIA.
Please Log in or Create an account to join the conversation.
- PCW
-
- Away
- Moderator
-
Less
More
- Posts: 19061
- Thank you received: 5260
20 Aug 2025 00:47 #333703
by PCW
Replied by PCW on topic Adaptive Feed Rate HAL example?
If this is just a simple linear back-off it might be something more easily
done using external offsets as is commonly done for Plasma torch height
control.
Otherwise, If you search the forum for motion.adaptive-feed, you will find a number of people
trying the same scheme for EDM
done using external offsets as is commonly done for Plasma torch height
control.
Otherwise, If you search the forum for motion.adaptive-feed, you will find a number of people
trying the same scheme for EDM
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 20575
- Thank you received: 7001
20 Aug 2025 01:57 #333705
by tommylight
Replied by tommylight on topic Adaptive Feed Rate HAL example?
BaxEDM uses LinuxCNC for the EDM machine he builds and sells and as far as i know everything except the power source he makes readily available, although i never checked.
There are many other using it, but usually hard to find, try youtube.
see the description it has a link to a lengthy forum thread.
There are many other using it, but usually hard to find, try youtube.
see the description it has a link to a lengthy forum thread.
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23460
- Thank you received: 4991
20 Aug 2025 12:50 #333735
by andypugh
I would suggest setting up an mpg and counter to have variable speed + and -, (like a cheap 16-click rotary switch)
But one way to do what you want would be with a mux block that passes-through +1 by default, and -1 when your bit is set.
linuxcnc.org/docs/stable/html/man/man9/mux2.9.html
See also linuxcnc.org/docs/stable/html/man/man9/m...9.html#MOTION%20PINS
I haven't tested this code, I am at work waiting for something to compile, so don't have access to LinuxCNC to test.
Replied by andypugh on topic Adaptive Feed Rate HAL example?
Starting slow is good, but a single bit input for reverse is probably too slow...I want to start slow...a single GPIO input bit sends a -1 value when asserted to command the reverse. Does anyone know of a example HAL file that has includes adaptive feed setup? TIA.
I would suggest setting up an mpg and counter to have variable speed + and -, (like a cheap 16-click rotary switch)
But one way to do what you want would be with a mux block that passes-through +1 by default, and -1 when your bit is set.
linuxcnc.org/docs/stable/html/man/man9/mux2.9.html
loadrt mux2
addf mux2.0 servo-thread
net control-bit mux2.0.sel
setp mux2.0.in0 1.0
setp mux2.0.in1 -1.0
net feed-out mux2.0.out motion.adaptive-feed
See also linuxcnc.org/docs/stable/html/man/man9/m...9.html#MOTION%20PINS
I haven't tested this code, I am at work waiting for something to compile, so don't have access to LinuxCNC to test.
Please Log in or Create an account to join the conversation.
Time to create page: 0.061 seconds