Despite this being my first time using Linux for anything, I have managed to get most of my control system working for my KRV2000 CNC conversion. However, I recently purchased a xhc whb04-6 pendant and have been trying to integrate it into the rest of the setup. This has been a nightmare – and I think I might need some help here. I am using a 7i76e controller board and 7185 (for eventual linear encoder feedback when I get it on the machine).
I started this over on my thread, KRV2000 Conversion, and have repeated some of my problems here so hopefully someone can help me resolve this. Thanks to Benb for helping me so far.
I have used talla83’s video instructions in
LinuxCNC 2.8.0 & XHC-WHB04B-4 - Inbetriebnahme wireless handwheel -.
Run in command line:
halrun
loadusr xhc-whb04b-6 -ue
and all buttons work including the handwheel encoder.
As per alkabal’s suggestion I also run 2 terminal windows:
One with:
halrun
loadusr -W xhc-whb04b-6 -Hsf
Another with:
watch -n0.4 halcmd show pin whb
This shows that the buttons (although not all are listed – I am less worried about this as there are more than enough for what I want), the scale and axis selection work but curiously the jog counts always stay at zero.
Using axis sim and inserting the whb04b-6.hal file into it’s folder and adding the HALFILE in the axis.ini, the mpg also works fine as far as linuxcnc software can see it and shows movement on screen.
Whenever I try to use it with my configuration, the buttons work fine but the encoder wheel doesn’t work. Reading the pins in hal configuration, the encoder scale, axis selection also work fine but the encoder counts never register. As there isn’t a conventional hal file for axis sim, I can not see the difference so I can compare it and debug my configuration.
The MPG pendant tells me that it is sending a signal from the encoder wheel because it displays the "send" black dot matrix box icon next to the battery icon when the wheel is turned.
I’ve used Halscope to monitor:
axis.x.jog-enable ,whb.halui.axis.x.select (on channels 1 and 2 respectively, which both synchronously give a signal when the axis select rotary switch on the MPG is turned to X)
At the same time:
pdnt.axis.x.jog-counts is monitored on channel 3 to monitor for pulses from the MPG jog wheel. None are ever recorded by halscope.
I have done a fresh install of linuxcnc from the bootable usb stick in an attempt to resolve this problem. The original version was 2.7.14 on the usb stick so I used the buildbot repository to upgrade to 2.8. I now have 2.8.1 running happily and yet I am still getting exactly the same problem. No jog counts are ever registered except when:
1. I use a modified version of sim.axis with the pendant hal file in the configuration folder. This displays a happily running encoder wheel that moves the position on screen and DRO to wherever I choose. The pulses register on halscope and in whb section of pins.
2. I run loadusr xhc-whb04b-6 -ue from the terminal. This displays a list of “stuff” (responses) whenever I turn the encoder wheel, or indeed turn any rotary switch or push buttons on the MPG.
The driver, I understand, is already integrated with this version of linuxcnc, the hardware registers the fact that the pulses are being transmitted and according to the terminal command and the modified sim.axis configuration, it works. The buttons always work but the encoder wheel doesn’t, except in the two above cases.
I have exhausted everything I can find on this forum and elsewhere on the internet in an effort to resolve this issue. I have tried numerous modifications in my hal files. I have tried to start from scratch new configurations using PncConf etc. I have also tried other people’s configurations who have apparently been successful with this pendant to no avail. I have even experimented with trying to build a hal configuration from axis.sim to try and carry over whatever it is that allows the encoder wheel to work in that configuration.
I have even gone as far as to take the pendant apart, disconnect the encoder and connect it to an oscilloscope to do a sanity check to make sure the thing is actually working (it does indeed send pulses!). I did this so that failing anything else I could attempt to bypass the usb and hardwire the encoder to TB5 pins 1 and 2, (INPUT16 and INPUT17) and thus hm2_7i76e.0.7176.0.0.enc0.count and at least get a usable device. I added in some hal code taken from another working configuration to attempt this (DrDFlo). This also failed.
So something in the software, somewhere, is obviously blocking the encoder counts from registering (or I’m just totally inept at hal configurations!)
Im pulling my hair out here, please help!