Discreet Physical/Hardware Jog Buttons - stumped

More
09 May 2018 23:37 #110472 by tripwire
tripwire created the topic: Discreet Physical/Hardware Jog Buttons - stumped
I can't seem to get my hardware jog buttons to work. (I'm running LinuxCNC 2.8-pre.) I've connected separate buttons (switches) to the BOB for my MESA 7i67e. But I'm getting no response from LCNC when pressing the buttons.

Hal file code for a "jog X plus" button:
net jog-x-plus <= hm2_7i76e.0.gpio.017.in_not => halui.axis.x.plus

Hal Meter shows the expected response when I press a jog button:
Pin halui.axis.x.plus changes from FALSE to TRUE, as does the gpio pin.

But there is no indication that linuxcnc is receiving the command. (No error message if in the wrong mode or any axis movement.)

Any help is greatly appreciated!
Dave L.
More
10 May 2018 00:52 #110479 by ozzyrob
ozzyrob replied the topic: Discreet Physical/Hardware Jog Buttons - stumped
Have you had a read through the halui manpage here ?
linuxcnc.org/docs/master/html/man/man1/halui.1.html

Seems to be some changes to the naming convention.

Tho it seems funny there is no "no pin error"

This is a brief:
forum.linuxcnc.org/38-general-linuxcnc-q...rors?start=10#110080

Hope this may help you.
The following user(s) said Thank You: tripwire
More
10 May 2018 13:34 #110510 by tripwire
tripwire replied the topic: Discreet Physical/Hardware Jog Buttons - stumped
Thanks OzzyRob! I tried various permutations of the hal command. Will give it another try and report back...
More
10 May 2018 14:30 #110517 by Todd Zuercher
Todd Zuercher replied the topic: Discreet Physical/Hardware Jog Buttons - stumped
When you tried to jog the machine using your above pins, had you homed the machine yet? Have you set a jog-speed? The pins halui.axis.jog-speed and halui.joint.jog-speed need to be connected to something for the jog pins to do anything.
Until after you home the machine you can not jog using the axis pins, you must use the joint jogging pins.
If your machine is a simple Cartesian gantry, simply connect both the joint and axis jog pins to your jog buttons. But don't forget to connect the jog pins for both gantry joints to the same button or you will rack your gantry.
The following user(s) said Thank You: tripwire
More
10 May 2018 20:04 #110539 by tripwire
tripwire replied the topic: Discreet Physical/Hardware Jog Buttons - stumped (solved!)
Thanks Todd! Your suggestion solved it. My original syntax was correct. (Which, ozzy, explains the absence of a "no pin" error.) But I needed to set a jog speed. I have a GladeVCP panel in my gui with a jog speed slider. So I connected this to halui.axis.jog-speed (in a post-gui hal file, don't know if that's necessary) as follows:
#post-gui.hal
net jog-speed gladevcp.jog_speed  halui.axis.jog-speed

And in my main hal file I connected my hardware input to halui as follows:
net jog-x-plus <= hm2_7i76e.0.gpio.017.in_not => halui.axis.x.plus

In my case, there were drop-outs and spontaneous machine movement! until I buffered the signals with a debounce object. Final code for all three axis:
loadrt debounce cfg=10 # for 4 limit switches and 6 jog buttons

addf debounce.0 servo-thread
setp debounce.0.delay 15

# --- Jog Buttons ---
net jog-x-plus-raw debounce.0.4.in <= hm2_7i76e.0.gpio.017.in_not 
net jog-x-plus debounce.0.4.out => halui.axis.x.plus
net jog-x-minus-raw debounce.0.5.in <= hm2_7i76e.0.gpio.019.in_not
net jog-x-minus debounce.0.5.out => halui.axis.x.minus

net jog-y-plus-raw debounce.0.6.in <= hm2_7i76e.0.gpio.021.in_not 
net jog-y-plus debounce.0.6.out => halui.axis.y.plus
net jog-y-minus-raw debounce.0.7.in <= hm2_7i76e.0.gpio.023.in_not
net jog-y-minus debounce.0.7.out => halui.axis.y.minus

net jog-z-plus-raw debounce.0.8.in <= hm2_7i76e.0.gpio.025.in_not 
net jog-z-plus debounce.0.8.out => halui.axis.z.plus
net jog-z-minus-raw debounce.0.9.in <= hm2_7i76e.0.gpio.026.in_not
net jog-z-minus debounce.0.9.out => halui.axis.z.minus

Thanks all! (Now it's on to some stepping logic...)

Dave L
Time to create page: 0.070 seconds
Powered by Kunena Forum