Dynamic jog speed from HAL, Possible?
- slowpoke
- Offline
- Elite Member
Less
More
- Posts: 173
- Thank you received: 25
20 Aug 2024 09:33 - 20 Aug 2024 09:37 #308207
by slowpoke
Dynamic jog speed from HAL, Possible? was created by slowpoke
I have a physical pot that is driving halui.axis.jog-speed.
Implementation in postgui.hal is as follows:
# Jog Speed
loadrt scale count=1
addf scale.0 servo-thread
setp scale.0.offset 0.0
setp scale.0.gain 0.12
net jog-pot-in scale.0.in <= arduino.ain.0
net jog-speed halui.axis.jog-speed <= scale.0.out
This works in the sense that I can change the jog speed and then the next jog will use that speed. however if while jogging I tweak the jog speed value with the pot, halui.axis.jog-speed changes however the actual speed does not change (until the next jog). Is there a way to make the jog speed follow the pot/halui.axis.jog-speed value while jogging?
Implementation in postgui.hal is as follows:
# Jog Speed
loadrt scale count=1
addf scale.0 servo-thread
setp scale.0.offset 0.0
setp scale.0.gain 0.12
net jog-pot-in scale.0.in <= arduino.ain.0
net jog-speed halui.axis.jog-speed <= scale.0.out
This works in the sense that I can change the jog speed and then the next jog will use that speed. however if while jogging I tweak the jog speed value with the pot, halui.axis.jog-speed changes however the actual speed does not change (until the next jog). Is there a way to make the jog speed follow the pot/halui.axis.jog-speed value while jogging?
Last edit: 20 Aug 2024 09:37 by slowpoke.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 4015
- Thank you received: 1731
20 Aug 2024 13:09 - 20 Aug 2024 13:22 #308214
by Aciera
Replied by Aciera on topic Dynamic jog speed from HAL, Possible?
This certainly works for me using panel buttons connecting to hal pins 'halui.axis.L.plus' and 'halui.axis.x.minus'.
Push the jog button and simultaneously change the jog speed with the potentiometer from 0..100%
[edit]
Just noticed that I also feed the potentiometer signal to 'gmoccapy.jog.jog-velocity.direct-value'. So maybe Gmoccapy has something to do with it.
Push the jog button and simultaneously change the jog speed with the potentiometer from 0..100%
[edit]
Just noticed that I also feed the potentiometer signal to 'gmoccapy.jog.jog-velocity.direct-value'. So maybe Gmoccapy has something to do with it.
Last edit: 20 Aug 2024 13:22 by Aciera.
Please Log in or Create an account to join the conversation.
- spumco
- Offline
- Platinum Member
Less
More
- Posts: 1831
- Thank you received: 741
20 Aug 2024 15:14 #308217
by spumco
Replied by spumco on topic Dynamic jog speed from HAL, Possible?
Maybe setting axis.L.jog-vel-mode to TRUE would cause in-process jogging to respond to speed changes?
Please Log in or Create an account to join the conversation.
- slowpoke
- Offline
- Elite Member
Less
More
- Posts: 173
- Thank you received: 25
21 Aug 2024 01:17 #308252
by slowpoke
Thanks for the input.
Replied by slowpoke on topic Dynamic jog speed from HAL, Possible?
I found a note somewhere that stated in axis the feed slider responds to halui.feed-override.increase and .decrease, however I'm using a pot feeding halui.axis.jog-speed not up and down buttons, so I think I'm out of luck with axis, unless there is some other method?This certainly works for me using panel buttons connecting to hal pins 'halui.axis.L.plus' and 'halui.axis.x.minus'.
Push the jog button and simultaneously change the jog speed with the potentiometer from 0..100%
[edit]
Just noticed that I also feed the potentiometer signal to 'gmoccapy.jog.jog-velocity.direct-value'. So maybe Gmoccapy has something to do with it.
Thanks for the input.
Please Log in or Create an account to join the conversation.
- slowpoke
- Offline
- Elite Member
Less
More
- Posts: 173
- Thank you received: 25
21 Aug 2024 01:20 #308254
by slowpoke
At least the feed-override acts dynamically, it even updates the slider in Axis when I twiddle the pot
Replied by slowpoke on topic Dynamic jog speed from HAL, Possible?
Thanks for that, I tried but axis.L.jog-vel-mode does not help.Maybe setting axis.L.jog-vel-mode to TRUE would cause in-process jogging to respond to speed changes?
At least the feed-override acts dynamically, it even updates the slider in Axis when I twiddle the pot
Please Log in or Create an account to join the conversation.
- Benb
- Offline
- Premium Member
Less
More
- Posts: 139
- Thank you received: 50
21 Aug 2024 02:06 - 21 Aug 2024 02:13 #308257
by Benb
Replied by Benb on topic Dynamic jog speed from HAL, Possible?
halui.axis.jog-speed - This pin is for setting jog speed for plus/minus jogging.
To jog an axis you need to select axis, set jog speed using potentiometers and press plus or minus push button (PB) to jog axis.
Most CNC machines built using Linuxcnc use joint (There is a whole spiel about axis/joint, google it if you would like to learn more about it).
Attached are function blocks of halui pins for axis to help visualize the jungle of pins. Halui has over 100 pins, I divided the related pins into function blocks to ease the visualization.For your info I added an external hadwired PB and UI widgets for +/- jog, you can use either or both.
Linuxcnc hal netlisting
# Load realtime Components and their counts
loadrt or2 count= 2
loadrt scale count= 1
# Add functions to threads
addf or2.0 servo-thread
addf or2.1 servo-thread
addf scale.0 servo-thread
# Set parameters
setp scale.0.offset 0.0
setp scale.0.gain 0.12
# Connect Pins with hal signals/Wires
net arduino.ain.0 scale.0.in
net axis.sel.z.sw halui.axis.z.select
net axis.speed.minus halui.axis.selected.minus or2.1.out
net axis.speed.plus or2.0.out halui.axis.selected.plus
net axis.x.sel.sw halui.axis.x.select
net axis.y.sel.sw halui.axis.y.select
net halui.axis.jog-speed scale.0.out halui.axis.jog-speed
net minus.speed.pb or2.1.in0
net minus.speed.ui or2.1.in1
net plus.speed.pb or2.0.in0
net plus.speed.ui or2.0.in1
To jog an axis you need to select axis, set jog speed using potentiometers and press plus or minus push button (PB) to jog axis.
Most CNC machines built using Linuxcnc use joint (There is a whole spiel about axis/joint, google it if you would like to learn more about it).
Attached are function blocks of halui pins for axis to help visualize the jungle of pins. Halui has over 100 pins, I divided the related pins into function blocks to ease the visualization.For your info I added an external hadwired PB and UI widgets for +/- jog, you can use either or both.
Linuxcnc hal netlisting
# Load realtime Components and their counts
loadrt or2 count= 2
loadrt scale count= 1
# Add functions to threads
addf or2.0 servo-thread
addf or2.1 servo-thread
addf scale.0 servo-thread
# Set parameters
setp scale.0.offset 0.0
setp scale.0.gain 0.12
# Connect Pins with hal signals/Wires
net arduino.ain.0 scale.0.in
net axis.sel.z.sw halui.axis.z.select
net axis.speed.minus halui.axis.selected.minus or2.1.out
net axis.speed.plus or2.0.out halui.axis.selected.plus
net axis.x.sel.sw halui.axis.x.select
net axis.y.sel.sw halui.axis.y.select
net halui.axis.jog-speed scale.0.out halui.axis.jog-speed
net minus.speed.pb or2.1.in0
net minus.speed.ui or2.1.in1
net plus.speed.pb or2.0.in0
net plus.speed.ui or2.0.in1
Attachments:
Last edit: 21 Aug 2024 02:13 by Benb.
The following user(s) said Thank You: slowpoke
Please Log in or Create an account to join the conversation.
Time to create page: 0.113 seconds