Adding a ShuttleXpress

More
17 Oct 2020 01:05 - 17 Oct 2020 01:07 #186337 by JetForMe
Replied by JetForMe on topic Adding a ShuttleXpress
By the way I think I found a way to simplify your config a little. You can use the pins halui.axis.L.select directly wired to the Shuttle buttons, and then use halui.axis.L.is-selected directly wired to the axis.L.jog-enabled. This should let you get rid of the flip flops.
Last edit: 17 Oct 2020 01:07 by JetForMe.

Please Log in or Create an account to join the conversation.

More
23 Jun 2021 04:09 #212716 by jcdammeyer
Replied by jcdammeyer on topic Adding a ShuttleXpress
Thought I'd take a try at connecting my Shuttle Express onto the Pi4 Linux2.8.1. Using the hal file, changing the count=4. Did an apt install xinput to remove the dual behaviour.

What is not working are:
1. the center wheel does not move the axis at all. HAL Meter shows Counts incrementing by 1000 as per the hal file but it doesn't seem to connect to the axis

2. As mentioned before, once a program is run the shuttle express no longer works. Have to stop and restart LinuxCNC to get it to work again. It behaves as if the F5 key has been pressed and although we are back in the Manual Control F3 screen the Shuttle Express can't see that.

This thread is a year old. Has everyone by chance abandoned this as a workable device?

Please Log in or Create an account to join the conversation.

More
23 Jun 2021 15:33 #212753 by andypugh
Replied by andypugh on topic Adding a ShuttleXpress

1. the center wheel does not move the axis at all. HAL Meter shows Counts incrementing by 1000 as per the hal file but it doesn't seem to connect to the axis


Do the counts increment an axis (and joint) counts pin? Is jog-enable true for that joint/axis?


2. As mentioned before, once a program is run the shuttle express no longer works. Have to stop and restart LinuxCNC to get it to work again. It behaves as if the F5 key has been pressed and although we are back in the Manual Control F3 screen the Shuttle Express can't see that.


The shuttle shouldn't know or care. Are you saying that after running a program the counts HAL pin stops responding? Does dmesg show the device disconnecting by any chance?

Please Log in or Create an account to join the conversation.

More
26 Jun 2021 04:27 #212942 by jcdammeyer
Replied by jcdammeyer on topic Adding a ShuttleXpress
Here's a snippet of the HAL file. Indeed I think your thoughts are headed in the right direction that this hal file was written for the older LinuxCNC that didn't address joints. So I added the enable and counter. Now the HAL Meters show the count increasing for each but it's not connected back to making it move. The axis arrow keys with either continuous or a step size do not increment the count value either.

So there is still some other connection to the joint members perhaps the definition from motion9:
"joint.N.jog-enable IN BIT
When TRUE (and in manual mode), any change to "jog-counts" will result in motion. When false, "jog-counts" is ignored."

I'm guessing the manual mode is not set since HAL meter shows this is TRUE.
John


#
# pushing an axis-button and turning the jog-wheel gives incremental
# jogging
#

# hook up the axis buttons to the axis jog-enable pins
net sxp.x-button axis.x.jog-enable joint.0.jog-enable
net sxp.y-button axis.y.jog-enable joint.1.jog-enable
net sxp.z-button axis.z.jog-enable joint.2.jog-enable

# The ShuttleXpress jog wheel has 10 clicks per revolution
#
# Low-pass filter the jogwheel, and scale it so one click is 1000 counts
# coming out of the ilowpass.
#
# Then connect it to the jog input on all the axes.

addf ilowpass.sxp servo-thread

setp ilowpass.sxp.gain .02
setp ilowpass.sxp.scale 1000

net sxp.counts => ilowpass.sxp.in

net sxp.counts-smoothed <= ilowpass.sxp.out
net sxp.counts-smoothed => axis.x.jog-counts joint.0.jog-counts
net sxp.counts-smoothed => axis.y.jog-counts joint.1.jog-counts
net sxp.counts-smoothed => axis.z.jog-counts joint.2.jog-counts

Please Log in or Create an account to join the conversation.

More
26 Jun 2021 07:51 #212950 by jcdammeyer
Replied by jcdammeyer on topic Adding a ShuttleXpress
Eureka!
The scale applied to axis._.jog-scale also needed to be applied to joint._.jog-scale

net sxp.jog-increment => axis.x.jog-scale
net sxp.jog-increment => axis.y.jog-scale
net sxp.jog-increment => axis.z.jog-scale

net sxp.jog-increment => joint.0.jog-scale
net sxp.jog-increment => joint.1.jog-scale
net sxp.jog-increment => joint.2.jog-scale

I then also modified the jog increment to move in decimal increments on the press of the 5th button.
# for each click of the jog-wheel there's 1000 simulated counts coming out
# of the ilowpass below, so these numbers are 1000x smaller than the jog
# increment size they encode
setp tristate-float.sxp-jog-increment-0.in 0.00001 # was 0.0000001
setp tristate-float.sxp-jog-increment-1.in 0.0001 # was 0.0000005
setp tristate-float.sxp-jog-increment-2.in 0.001 # was 0.000001
setp tristate-float.sxp-jog-increment-3.in 0.010 # was 0.000010

And to actually only move no more than 0.1000 for the furthest increment I had to reduce the scale to 10 from 1000
setp ilowpass.sxp.scale 10

Given that the spring loaded outer knob can move at various speeds I don't actually see the need for anything more than 0.001" motion. Maybe also 0.0001". On my MACH3 system I use the 5th button to toggle the spindle. ,

I'd rather have the button toggle the spindle and the center encoder adjust spindle speed.

Please Log in or Create an account to join the conversation.

More
26 Jun 2021 21:11 #212983 by jcdammeyer
Replied by jcdammeyer on topic Adding a ShuttleXpress
Item #2. Outer wheel no longer moves axis after program runs.

I've found that now that the inner wheel can move the axis (z has a motor attached) that this works even after a program runs so that means the device has not been disconnected. I then found that in fact it's not a program running. It's only if all 4 axis have been homed.

For example, if only X,Y and Z are homed then the Z axis motion is still possible. But add the A axis at which point MDI and programs can be run then suddenly the outer wheel will no longer jog any axis. The inner wheel still moves the axis with the preset distance moves.

So it's something that prevents
net sxp.abs-jog-speed => halui.joint.jog-speed
from moving the currently selected axis.

I've examined all sorts of pins and signals before they are all homed and then again after. I can't spot which is different. I've attached the current updated version of the shuttle hal file.
Attachments:

Please Log in or Create an account to join the conversation.

More
28 Jun 2021 01:08 - 28 Jun 2021 01:12 #213066 by jcdammeyer
Replied by jcdammeyer on topic Adding a ShuttleXpress
So it's now working.  I've edited the shuttle hal file to include the A axis which meant adding the logic component for 3 input OR gates. 

The problem with not moving after a g-code program ran was this line and the one for .minus was needed for each axis.  Once done the all axis homed condition no longer prevented outer spring loaded wheel motion.

net sxp.jog-x-pos and2.sxp-x-pos.out => halui.joint.0.plus halui.axis.x.plus

I've also adjusted the step and the move rates to be more useful for rapidly approaching a point and then sneaking up to it.  As yet I have not figured out how to update the drop down list in the axisui to reflect the current step distance.  But then the HBO4 doesn't do it either but it has an LCD display that shows this.

Enjoy.
John Dammeyer 
Attachments:
Last edit: 28 Jun 2021 01:12 by jcdammeyer. Reason: Clean up text and add file that wasn't added the first time.
The following user(s) said Thank You: mudnaes

Please Log in or Create an account to join the conversation.

More
08 Aug 2023 18:27 #277357 by mudnaes
Replied by mudnaes on topic Adding a ShuttleXpress
Big thanks to @jcdammeyer. This really saved my day after fiddling with several configs found on Github and other forums for a couple of weeks. Worked straight out of the box!

This config also contains some awesome work to avoid having to hold axis-button and jog-wheel at the same time. Makes Shuttlexpress a really good pendant.

So for anyone else trying to connect a Shuttlexpress to LinuxCNC 2.8.4: Use the link above (attachment, button with i on).

If you dont have A-axis just comment out anything to do with joint.3. If you dont, you will get an error when starting LinuxCNC.
 

Please Log in or Create an account to join the conversation.

Time to create page: 0.168 seconds
Powered by Kunena Forum