MPG Jog Wheel
- billnixon
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 2
03 Oct 2019 20:29 #147027
by billnixon
MPG Jog Wheel was created by billnixon
I'm trying to get a basic 1 axis jog wheel to work as a proof of concept, but it's not working yet. Here is the little section of hal:
# --- MPG Jog X ---
setp axis.x.jog-vel-mode 0
setp axis.x.jog-scale .01
net x-jog-enable hm2_5i25.0.7i73.0.1.input-22-not => axis.x.jog-enable
net mpg-counts hm2_5i25.0.7i73.0.1.enc0.count => axis.x.jog-counts
The jog enable is just through a switch for testing purposes.
According to hal meters:
The switch output does not make it to axis.x.jog-enable.
The enc0.counts does not make it to axis.x.jog-counts.
The machine is homed before testing.
Any ideas what I can test?
# --- MPG Jog X ---
setp axis.x.jog-vel-mode 0
setp axis.x.jog-scale .01
net x-jog-enable hm2_5i25.0.7i73.0.1.input-22-not => axis.x.jog-enable
net mpg-counts hm2_5i25.0.7i73.0.1.enc0.count => axis.x.jog-counts
The jog enable is just through a switch for testing purposes.
According to hal meters:
The switch output does not make it to axis.x.jog-enable.
The enc0.counts does not make it to axis.x.jog-counts.
The machine is homed before testing.
Any ideas what I can test?
Please Log in or Create an account to join the conversation.
- andypugh
-
- Offline
- Moderator
-
Less
More
- Posts: 23323
- Thank you received: 4948
04 Oct 2019 04:24 #147089
by andypugh
Replied by andypugh on topic MPG Jog Wheel
Does the halmeter show the 7i73 pin values changing?
If it does then it suggests that your HAL code is not actually being executed.
If it does then it suggests that your HAL code is not actually being executed.
Please Log in or Create an account to join the conversation.
- pl7i92
-
- Offline
- Platinum Member
-
Less
More
- Posts: 1872
- Thank you received: 357
04 Oct 2019 10:34 #147106
by pl7i92
Replied by pl7i92 on topic MPG Jog Wheel
some more infos woudt be good what version of liuxcnc are you using
what OS
did you try the halui version in a postgui file
what OS
did you try the halui version in a postgui file
Please Log in or Create an account to join the conversation.
- billnixon
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 2
04 Oct 2019 18:07 #147126
by billnixon
Replied by billnixon on topic MPG Jog Wheel
Andy was right about the hal file. I was referencing the wrong file. 
With the correct hal file, axis.x.jog-count does change with the encoder, but the axis still does not move. I am running version 2.8 on Mint 19 with the preempt kernel.
Here is a snippet from the hal:
####### MPG #######
# --- MPG Jog X ---
setp axis.x.jog-vel-mode 1
net x-jog-enable hm2_5i25.0.7i73.0.1.input-20-not => axis.x.jog-enable
setp axis.x.jog-scale .01
net mpg-counts hm2_5i25.0.7i73.0.1.enc0.count
net mpg-counts => axis.x.jog-counts
####### Rapid Override #######
net rapid-override-enable hm2_5i25.0.7i73.0.1.input-22-not => halui.rapid-override.count-enable
net mpg-counts => halui.rapid-override.counts
Using the mpg to change the rapid override works.
Here is another clue: jogging via a button works with halui.joint.0.plus, but not with halui.axis.x.plus.
I have not tried putting the jogging hal in the poustgui hal file. How do I determine what to put in the postgui file?

With the correct hal file, axis.x.jog-count does change with the encoder, but the axis still does not move. I am running version 2.8 on Mint 19 with the preempt kernel.
Here is a snippet from the hal:
####### MPG #######
# --- MPG Jog X ---
setp axis.x.jog-vel-mode 1
net x-jog-enable hm2_5i25.0.7i73.0.1.input-20-not => axis.x.jog-enable
setp axis.x.jog-scale .01
net mpg-counts hm2_5i25.0.7i73.0.1.enc0.count
net mpg-counts => axis.x.jog-counts
####### Rapid Override #######
net rapid-override-enable hm2_5i25.0.7i73.0.1.input-22-not => halui.rapid-override.count-enable
net mpg-counts => halui.rapid-override.counts
Using the mpg to change the rapid override works.
Here is another clue: jogging via a button works with halui.joint.0.plus, but not with halui.axis.x.plus.
I have not tried putting the jogging hal in the poustgui hal file. How do I determine what to put in the postgui file?
Attachments:
Please Log in or Create an account to join the conversation.
- billnixon
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 2
06 Oct 2019 14:44 #147248
by billnixon
Replied by billnixon on topic MPG Jog Wheel
Update:
Jogging via a jog button works with halui.joint.0.plus while unhomed, but not while homed.
Jogging via a jog button works with halui.axis.x.plus while homed, but not while unhomed.
The mpg action is similar. It works with joint.0.jog-counts while unhomed, but not while homed. It works with axis.x.jog-counts while homed, but not while unhomed.
So the jogging works with joints unhomed, but not while homed. Is this normal, or do I still have a problem?
Jogging via a jog button works with halui.joint.0.plus while unhomed, but not while homed.
Jogging via a jog button works with halui.axis.x.plus while homed, but not while unhomed.
The mpg action is similar. It works with joint.0.jog-counts while unhomed, but not while homed. It works with axis.x.jog-counts while homed, but not while unhomed.
So the jogging works with joints unhomed, but not while homed. Is this normal, or do I still have a problem?
Please Log in or Create an account to join the conversation.
- newbynobi
-
- Offline
- Platinum Member
-
Less
More
- Posts: 2082
- Thank you received: 413
07 Oct 2019 19:25 #147362
by newbynobi
Replied by newbynobi on topic MPG Jog Wheel
Prior to homing you will need to jog joints, not axis!
Check if the machine moves after homing using the mpg
Check if the machine moves after homing using the mpg
Please Log in or Create an account to join the conversation.
- billnixon
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 2
08 Oct 2019 02:19 #147409
by billnixon
Replied by billnixon on topic MPG Jog Wheel
Yes, the machine moves after homing using the mpg when I connect the mpg to axis.x.jog-counts.
Would it be advisable to connect the jog buttons to both axis and joint like the following example using the x axis, so they would work before and after homing?
net jog-x-pos => halui.joint.0.plus halui.axis.x.plus
If this is okay, the jogging should be good to go.
Would it be advisable to connect the jog buttons to both axis and joint like the following example using the x axis, so they would work before and after homing?
net jog-x-pos => halui.joint.0.plus halui.axis.x.plus
If this is okay, the jogging should be good to go.
Please Log in or Create an account to join the conversation.
- dgarrett
- Offline
- Platinum Member
-
Less
More
- Posts: 567
- Thank you received: 325
08 Oct 2019 02:56 #147412
by dgarrett
Advisable for trivkins kinematics for branches 2.8 and
after
Ref: linuxcnc.org/docs/2.8/html/getting-start...dating-linuxcnc.html
Halui jogging:
linuxcnc.org/docs/2.8/html/getting-start...linuxcnc.html#_halui
Wheel (MPG) jogging:
linuxcnc.org/docs/2.8/html/getting-start...se_generator_jogging
Replied by dgarrett on topic MPG Jog Wheel
Would it be advisable to connect the jog buttons
to both axis and joint like the following example using
the x axis, so they would work before and after homing?
net jog-x-pos => halui.joint.0.plus halui.axis.x.plus
Advisable for trivkins kinematics for branches 2.8 and
after
Ref: linuxcnc.org/docs/2.8/html/getting-start...dating-linuxcnc.html
Halui jogging:
linuxcnc.org/docs/2.8/html/getting-start...linuxcnc.html#_halui
Wheel (MPG) jogging:
linuxcnc.org/docs/2.8/html/getting-start...se_generator_jogging
Please Log in or Create an account to join the conversation.
- billnixon
- Offline
- Senior Member
-
Less
More
- Posts: 43
- Thank you received: 2
08 Oct 2019 12:00 #147454
by billnixon
Replied by billnixon on topic MPG Jog Wheel
Thanks for the help

Please Log in or Create an account to join the conversation.
Time to create page: 0.082 seconds