Joystick not working after all axis are homed [FIXED]
- paulctan
- Offline
- Junior Member
Less
More
- Posts: 20
- Thank you received: 1
08 May 2019 14:02 #133142
by paulctan
Joystick not working after all axis are homed was created by paulctan
Joystick implemented using wiki.linuxcnc.org/cgi-bin/wiki.pl?Simple_Remote_Pendant . Joystick was working on previous Linuxcnc 2.7 setup. Rebuilt new machine and moved the joystick over and modified code to work with Linuxcnc 2.8.
Joystick works fine in new setup, except when all Axis are homed! Joystick works when I home Z (X & Y not homed). Joystick works when I home Z & X (Y not homed). Joystick stops working when Z & X & Y are all homed. Joystick works again when I press the unhomed button.
Halmeter show the joystick signal joy-x-jog, joy-y-jog, joy-z-jog to be working even when fully homed, but the table is not moving.
Can someone help? Thanks!
Paul Tan.
Joystick works fine in new setup, except when all Axis are homed! Joystick works when I home Z (X & Y not homed). Joystick works when I home Z & X (Y not homed). Joystick stops working when Z & X & Y are all homed. Joystick works again when I press the unhomed button.
Halmeter show the joystick signal joy-x-jog, joy-y-jog, joy-z-jog to be working even when fully homed, but the table is not moving.
Can someone help? Thanks!
Paul Tan.
cnc@cnc1:~/linuxcnc/configs/Taig$ cat custom_postgui.hal
# Include your custom_postgui HAL commands here
# This file will not be overwritten when you run PNCconf again
loadrt or2 count=2
loadrt mux4 count=1
addf or2.0 servo-thread
addf or2.1 servo-thread
addf mux4.0 servo-thread
# set the jog speed for the joypad again use numbers that make sense for your machine
setp mux4.0.in0 0 # this one must be 0 to prevent motion unless a button is pressed
setp mux4.0.in1 1
setp mux4.0.in2 20
setp mux4.0.in3 40
# the following does the magic of setting the jog speeds
net remote-speed-slow or2.0.in0 input.0.btn-joystick
net remote-speed-medium or2.1.in0 input.0.btn-thumb
net remote-speed-fast or2.0.in1 or2.1.in1 input.0.btn-thumb2
net joy-speed-1 mux4.0.sel0 <= or2.0.out
net joy-speed-2 mux4.0.sel1 <= or2.1.out
net joy-speed-final halui.joint.jog-speed <= mux4.0.out
setp input.0.abs-x-scale -127.5
setp input.0.abs-rz-scale -127.5
net joy-x-jog halui.joint.0.analog <= input.0.abs-x-position
net joy-y-jog halui.joint.1.analog <= input.0.abs-y-position
net joy-z-jog halui.joint.2.analog <= input.0.abs-rz-position
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4864
08 May 2019 15:46 - 08 May 2019 15:46 #133158
by andypugh
Replied by andypugh on topic Joystick not working after all axis are homed
This is a surprisingly easy fix
As well as linking your joystick jog signals to the _joint_ jogging pins, you also need to connect them to the _axis_ jogging pins.
something like
As well as linking your joystick jog signals to the _joint_ jogging pins, you also need to connect them to the _axis_ jogging pins.
something like
net jog-x-analogue halui.joint.0.analog halui.axis.x.analog
Last edit: 08 May 2019 15:46 by andypugh.
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17997
- Thank you received: 4842
08 May 2019 15:48 - 08 May 2019 15:48 #133159
by PCW
Replied by PCW on topic Joystick not working after all axis are homed
You need to jog axis after homing, not joints so you probably need to drive the
appropriate halui axis jog pins from your input.0.abs-N-position pins in addition to the joint jog pins
appropriate halui axis jog pins from your input.0.abs-N-position pins in addition to the joint jog pins
Last edit: 08 May 2019 15:48 by PCW. Reason: spell a little better
Please Log in or Create an account to join the conversation.
- paulctan
- Offline
- Junior Member
Less
More
- Posts: 20
- Thank you received: 1
08 May 2019 16:36 #133165
by paulctan
Replied by paulctan on topic Joystick not working after all axis are homed
Tried it, it didn't work. Same behavior - Joystick works before homing all the axis, stops working after all axis are homed. Jog button on gmoccapy screen still works after homing. I did the following change:
setp input.0.abs-x-scale -127.5
setp input.0.abs-rz-scale -127.5
#net joy-x-jog halui.joint.0.analog <= input.0.abs-x-position
#net joy-y-jog halui.joint.1.analog <= input.0.abs-y-position
#net joy-z-jog halui.joint.2.analog <= input.0.abs-rz-position
net jog-x-analog halui.joint.0.analog halui.axis.x.analog input.0.abs-x-position
net jog-y-analog halui.joint.1.analog halui.axis.y.analog input.0.abs-y-position
net jog-z-analog halui.joint.2.analog halui.axis.z.analog input.0.abs-rz-position
setp input.0.abs-x-scale -127.5
setp input.0.abs-rz-scale -127.5
#net joy-x-jog halui.joint.0.analog <= input.0.abs-x-position
#net joy-y-jog halui.joint.1.analog <= input.0.abs-y-position
#net joy-z-jog halui.joint.2.analog <= input.0.abs-rz-position
net jog-x-analog halui.joint.0.analog halui.axis.x.analog input.0.abs-x-position
net jog-y-analog halui.joint.1.analog halui.axis.y.analog input.0.abs-y-position
net jog-z-analog halui.joint.2.analog halui.axis.z.analog input.0.abs-rz-position
Please Log in or Create an account to join the conversation.
- PCW
- Away
- Moderator
Less
More
- Posts: 17997
- Thank you received: 4842
08 May 2019 16:39 #133166
by PCW
Replied by PCW on topic Joystick not working after all axis are homed
is " axis.L.jog-enable" true?
Please Log in or Create an account to join the conversation.
- paulctan
- Offline
- Junior Member
Less
More
- Posts: 20
- Thank you received: 1
08 May 2019 16:52 #133170
by paulctan
Replied by paulctan on topic Joystick not working after all axis are homed [FIXED]
Didn't check " axis.L.jog-enable", but this FINALLY worked:
I joined halui.joint.jog-speed to halui.axis.jog-speed.
For anyone needing this again, here's the full file that works:
Thanks everyone for helping!
One more quick question though - where's the best place to find the up to date documentation on LinuxCNC 2.8? I'm finding the docs still reference the old 2.7 HAL.
#net joy-speed-final halui.joint.jog-speed <= mux4.0.out
net jog-speed halui.joint.jog-speed halui.axis.jog-speed <= mux4.0.out
I joined halui.joint.jog-speed to halui.axis.jog-speed.
For anyone needing this again, here's the full file that works:
loadrt or2 count=2
loadrt mux4 count=1
addf or2.0 servo-thread
addf or2.1 servo-thread
addf mux4.0 servo-thread
# set the jog speed for the joypad again use numbers that make sense for your machine
setp mux4.0.in0 0 # this one must be 0 to prevent motion unless a button is pressed
setp mux4.0.in1 1
setp mux4.0.in2 20
setp mux4.0.in3 40
# the following does the magic of setting the jog speeds
net remote-speed-slow or2.0.in0 input.0.btn-joystick
net remote-speed-medium or2.1.in0 input.0.btn-thumb
net remote-speed-fast or2.0.in1 or2.1.in1 input.0.btn-thumb2
net joy-speed-1 mux4.0.sel0 <= or2.0.out
net joy-speed-2 mux4.0.sel1 <= or2.1.out
#net joy-speed-final halui.joint.jog-speed <= mux4.0.out
net jog-speed halui.joint.jog-speed halui.axis.jog-speed <= mux4.0.out
setp input.0.abs-x-scale -127.5
setp input.0.abs-rz-scale -127.5
#net joy-x-jog halui.joint.0.analog <= input.0.abs-x-position
#net joy-y-jog halui.joint.1.analog <= input.0.abs-y-position
#net joy-z-jog halui.joint.2.analog <= input.0.abs-rz-position
net jog-x-analog halui.joint.0.analog halui.axis.x.analog input.0.abs-x-position
net jog-y-analog halui.joint.1.analog halui.axis.y.analog input.0.abs-y-position
net jog-z-analog halui.joint.2.analog halui.axis.z.analog input.0.abs-rz-position
Thanks everyone for helping!
One more quick question though - where's the best place to find the up to date documentation on LinuxCNC 2.8? I'm finding the docs still reference the old 2.7 HAL.
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4864
08 May 2019 17:40 #133175
by andypugh
Replied by andypugh on topic Joystick not working after all axis are homed [FIXED]
Please Log in or Create an account to join the conversation.
Time to create page: 0.123 seconds