Ah man! I really wanted to make some parts while he wasn't looking. Oh well....
Anyways, let's install the hal_input extension. This is part of the normal linuxcnc distribution, and interfaces with USB HID devices like your pendant. There are two files: hal_input and linux_event.py. The following instructions assume you have PP setup as a PCNC 1100 controller. Do this from the command prompt (control-alt-x):
Code:
1. cd /tmp; wget http://justinmitchell.net/pp/hal_input.tbz (if you don't have internet access, copy this to a usb drive, plugin, then type "cp ~/gcode/USB/hal_input.tbz /tmp")
2. tar jxvf hal_input.tbz
3. cd hal_input
4. cp hal_input ~/tmc/bin/
5. cp linux_event.py ~/tmc/lib/python/
The files are now in place, but you need to edit a config file to load the extension. If you're not familiar with editing text files on linux, I recommend the "pico" text editor. It's easier to use than some of the others.
Code:
6. pico ~/tmc/configs/tormach_mill/tormach_mill_5i25.hal
7. Use the arrow keys to scroll down to line 32 (just below "loadusr -W usbio")
8. Type: loadusr -W hal_input -KRAL VistaCNC
9. control-o (to save)
10. control-x (to quit)
11. sudo reboot
If you get errors upon reboot, it means that you (or me ) made a typo in one of the previous steps. No biggie... just hit control-alt-x and check everything. Or you can just install the 1.8.2 update and start over.
Assuming there are no errors, type "admin halmeter" at the MDI prompt. This brings up a list of all the pins, signals, and parameters in PP. Scroll down and find the ones that look like "input.0.x". If these exist, then it means hal_input has successfully loaded. Each of these inputs correspond to a button/knob on the pendant. Try clicking on several and hitting buttons on your pendant and see if the output value changes. There's no need to do this for all of them... I just want to make sure that it is working.
Next I'm going to have you save this list to a text file. First attach a USB thumb drive to the computer.
Now open up a command prompt (control-alt-x) and type:
Code:
LD_LIBRARY_PATH=~/tmc/lib ~/tmc/bin/halcmd show > ~/gcode/USB/halshow.txt
Now take that drive to another computer and attach the list to a post here.