How to configure a XHC-WHB04B pendant ?

More
5 years 3 months ago - 5 years 3 months ago #215621 by MRx
Ok this is really broke, I modified the driver to expose joint signals as well. I'm just synchronizing the axis signal to joint signals (it could probably also be done in the configuration, but in the driver it seems to be straight forward).

before it's homed it will take the signals from joint.* once it's homed it will take the signals from axis.*
There's no need to manually switch between free / teleop mode at all it seems.

Also the M-Home option on the pendant doesn't seem to be useful for me, I use to home manually on my lathe (on the milling machine I do automatic homing), I'm going to expose new pins to allow homing the currently active axis (it's just an addition if someone doesn't want to use those pins just leave them unconnected)
Last edit: 5 years 3 months ago by MRx.

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

More
5 years 3 months ago - 5 years 3 months ago #215641 by MRx
I have added new pins to the driver home / unhome

- when wiring up the home / unhome joints it is possible to independently home all axis (and it's possible to drive outside the designated area for homing purpose)
- when pushing the M-Home button >1 sec it will send an unhome request
- when pushing the M-Home button <1 sec it will send a home request

the requests are sent when the button is released (I tested the haptic for this and it feels comfortable)

# those are active before homing
net pdnt.joint.0.jog-scale whb.joint.0.jog-scale joint.0.jog-scale
net pdnt.joint.1.jog-scale whb.joint.1.jog-scale joint.2.jog-scale
net pdnt.joint.2.jog-scale whb.joint.2.jog-scale joint.1.jog-scale
#net pdnt.joint.3.jog-scale whb.joint.3.jog-scale joint.3.jog-scale

net pdnt.joint.0.jog-counts whb.joint.0.jog-counts joint.0.jog-counts
net pdnt.joint.1.jog-counts whb.joint.1.jog-counts joint.2.jog-counts
net pdnt.joint.2.jog-counts whb.joint.2.jog-counts joint.1.jog-counts
#net pdnt.joint.3.jog-counts whb.joint.3.jog-counts jonit.3.jog-counts
net pdnt.joint.0.jog-enable whb.joint.0.jog-enable joint.0.jog-enable
net pdnt.joint.1.jog-enable whb.joint.1.jog-enable joint.2.jog-enable
net pdnt.joint.2.jog-enable whb.joint.2.jog-enable joint.1.jog-enable

net pdnt.joint.0.home whb.joint.0.home halui.joint.0.home
net pdnt.joint.1.home whb.joint.1.home halui.joint.2.home
net pdnt.joint.2.home whb.joint.2.home halui.joint.1.home

net pdnt.joint.0.unhome whb.joint.0.unhome halui.joint.0.unhome
net pdnt.joint.1.unhome whb.joint.1.unhome halui.joint.2.unhome
net pdnt.joint.2.unhome whb.joint.2.unhome halui.joint.1.unhome


Those entries will be mandatory in order to be able to use the pendant when the machine is not homed.
(please note the joint 1 <-> joint 2 twist is related to my setup)

Todo:
- anyone volunteer to clean up the code? There should be a class for each timed button to tidy up the code. I'm absolutely overloaded at the moment on my side with various other tasks....
Last edit: 5 years 3 months ago by MRx.

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

More
5 years 3 months ago #215653 by andypugh

Ok this is really broke, I modified the driver to expose joint signals as well. 
That isn't usually necessary, LinuxCNC switches which input pins it looks at depending on mode. 

So, typically, a line like this will jog both:
Code:
net x-jog driver.jog-counts-0 => axis.x.jog-counts joint.0.jog-counts

And similarly for the other outputs and axes / joints.

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

More
5 years 3 months ago - 5 years 3 months ago #215674 by MRx
No this would still be broke because it switches to teleop mode which won't allow to drive outside the designated area (that was the initial reason why I had a closer look at it).
The current update is very comfortable with my setup and my mill which supports automatic homing (I'm now homing each axis independently using the knob to select x/y/z/a/c and directly with the pendant), also with the lathe which I'm homing manually.
Last edit: 5 years 3 months ago by MRx.

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

More
5 years 3 months ago #215677 by andypugh
How does it switch to Teleop? I am a bit confused that a HAL driver can do that.

What is the "it" here?

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

More
5 years 3 months ago - 5 years 3 months ago #215680 by MRx
it? the XHC-WHB04B driver. And yes even the keyboard cannot manually home anymore after using the pendant with the current driver.
it's connected via halui in the configuration to switch the mode, basically that can configuration can also go away I don't see that the driver has to mess around with that at all.

tinyurl.com/36nsd7cj

it's wildly doing that and not correctly either.

After removing that wild code, your configuration would start to work.
Last edit: 5 years 3 months ago by MRx.

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

Time to create page: 0.413 seconds
Powered by Kunena Forum