Getting a WHB04B-4 working.

More
6 years 4 months ago #173195 by photomankc
God.

Nope, not working. Will not load the module in the live config. No errors, not messages, no 'whb' pins in hal so nothing in that hal file can possibly work.

This is wearing me down.

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

More
6 years 4 months ago #173200 by photomankc
Okay. I verified twice that it loaded when I typed the command from the file into halcmd, but when I copied and pasted the loadusr line from the file it would either not load, or hang waiting for the device. So I retyped the command into the file and deleted all other lines. I confirmed that it was typed letter for letter the same and deleted the old line. Now it loads in the live machine. All of the other lines behave the same producing strange results (like an error claiming halui.machine.is-on didn't exist) unless I hand type them in.

Best guess is that there is some non-printing character in there that's messing things up.

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

More
6 years 4 months ago #173202 by tommylight
Use gedit or mousepad or xed or geany for editing on linux, nothing else will do as they will insert line breaks and other stuff.
Notepad or Notepad++ for windows.
No word processors.

ASUS ROG Crosshair VIII Impact - AMD X570

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

More
6 years 4 months ago - 6 years 4 months ago #173209 by alkabal
Replied by alkabal on topic Getting a WHB04B-4 working.
I think start with a working config

if not exist create rule file with this exact things and reboot after saving
sudo nano /etc/udev/rules.d99-xhc-whb04b-6.rules
Code:
# xhc-whb04b-6 mpg pendant ATTR{idProduct}=="eb93", ATTR{idVendor}=="10ce", MODE="666", OWNER="root", GROUP="plugdev"

So basically you only need to download this file : (untested wget command...)
Code:
cd your_config_directory wget -O xhc-whb04b-6.hal https://github.com/LinuxCNC/linuxcnc/raw/master/src/hal/user_comps/xhc-whb04b-6/example-configuration.md


Edit your "know as working config.ini"
nano your_config.ini

for adding
Code:
[HALUI] MDI_COMMAND=(debug,macro0) MDI_COMMAND=(debug,macro1) MDI_COMMAND=(debug,macro2) MDI_COMMAND=(debug,macro3) MDI_COMMAND=(debug,macro4) MDI_COMMAND=(debug,macro4) MDI_COMMAND=(debug,macro6) MDI_COMMAND=(debug,macro4) MDI_COMMAND=(debug,macro8) MDI_COMMAND=(debug,macro9) MDI_COMMAND=(debug,macro10) MDI_COMMAND=(debug,macro11) MDI_COMMAND=(debug,macro12) MDI_COMMAND=(debug,macro13) MDI_COMMAND=(debug,macro14) MDI_COMMAND=(debug,macro15) MDI_COMMAND=(debug,macro16)

and add to HAL section (i think before POSTGUI_HALFILE)
Code:
HALFILE = xhc-whb04b-6.hal

thats all ! (i hope :laugh: )
Last edit: 6 years 4 months ago by alkabal.

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

More
6 years 4 months ago #173248 by andypugh
A common cause of wierd HAL errors is that if you copy and paste HAL from the web you end up with em-dash rather than minus as the - character. And that doesn't work in HAL files.
The following user(s) said Thank You: photomankc

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

More
6 years 4 months ago #173315 by photomankc

tommylight wrote: Use gedit or mousepad or xed or geany for editing on linux, nothing else will do as they will insert line breaks and other stuff.
Notepad or Notepad++ for windows.
No word processors.


Oh yeah, I think though I did this on a Mac with the text editor app set to plain text, but I wonder if it kept some stuff when I copied/pasted the example. Anyway, with that discovered, I've ripped it all out and put it back in a bit at a time by typing it out in nano through SSH. That's been good as it gave me a chance to get more familiar with what it's doing than I would if I were just slapping in a copy and fixing errors.

So it looks like it's good to go, Jogging is working, I've integrated the control signals into the rest of my existing nets and got the stuff it provides through it's internal halui pins hooked up. Just need to work on the buttons and I'll be back to where I was prior. I'm going to buy 2 or 3 more over the next few months to keep as spares.

Thanks everyone for the help!

To kind of wrap up what I really needed minus the config file having bad characters:

1.) Obtained a copy of Debian stretch with LinuxCNC 2.7 pre-installed and installed it on PC.
2.) Verified that the initial install created user was in dialout group
3.) Used package manager to remove the 2.7 packages, and added and selected the 2.8 repos decribed here .
4.) Created the file 99-xhc-whb04b-6.rules in /etc/udev/rules.d with the single line (if you don't already have one covering it):
Code:
ATTR{idProduct}=="eb93", ATTR{idVendor}=="10ce", MODE="0666", OWNER="root", GROUP="dialout"
5.) Created the file xhc-whb04b-6.hal with the sample config from here and edited that to suit my machine (ie Start linuxCNC and see what error it reports ;) )

Note that you need those whb.halui mode pins, both the status and the control, hooked up for it to behave right. That took me some work as they were already claimed for PYVCP panel in places. Had to add some logic in to integrate them with the pendant too.

Otherwise you'll get weird behavior where the jogging only works when you click your heels three times, type an MDI command, and switch back to manual via the Axis GUI tab. It's obviously got internal state that has to be kept in sync with the application. I'm guessing it's best to hook up all the control signals even if they aren't in use in your implementation.

Hopefully this helps the next poor schlub that has his old HB04 die on him!
The following user(s) said Thank You: tommylight

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

Time to create page: 0.463 seconds
Powered by Kunena Forum