![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| LinuxCNC (formerly EMC2) Discuss LinuxCNC (formerly EMC2) Controlers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
| |||
| |||
Hi everyone, as I near completion on my first CNC machine (building a 25x25 Solsylva) I have decided to spend a bit of time getting the software configured. I am trying to add a Logitech F310 gamepad to the system for manual jogging and have run into 2 problems I was hoping to get some assistance with. 1) Without posting TONS of config info, hopefully there is enough relevant here to get some help, I have (as root) added the file: /etc/udev/rules.d/emc_joy.rules file. It contains one line: SUBSYSTEM="input", mode="0660", group="plugdev" Here is the HAL section of Solsylva.ini (my main ini) [HAL] HALUI = halui HALFILE = Solsylva.hal HALFILE = custom.hal HALFILE = joypad.hal HALUI = halui POSTGUI_HALFILE = custom_postgui.hal Here is the contents of my joypad.hal file: loadusr -W hal_input -KRAL X-Box Here is the (relevant) section of: more /proc/bus/input/devices: I: Bus=0003 Vendor=046d Product=c21d Version=4013 N: Name="Generic X-Box pad" P: Phys=usb-0000:00:1f.4-1/input0 S: Sysfs=/devices/pci0000:00/0000:00:1f.4/usb2/2-1/2-1:1.0/input/input6 U: Uniq= H: Handlers=event6 js0 B: EV=20000b B: KEY=78db0000 400000 0 0 0 0 0 0 0 0 B: ABS=3003f B: FF=1 7030000 0 0 Now, if I run: halrun loadusr -W hal_input -KRAL X-Box showpin I get the entire listing of pins. I can now start EMC2 and AXIS, go to machine, and "Show hal configuration" I can click the "watch" tab, select pins, and hit buttons on the controller. I see the little circles change colors with each button press and I see the values change with joystick movement. Now, If I reboot the box, nothing works. I get: halcmd: loadusr -W hal_input -KRAL X-Box No input devices could be opened. This usually indicates a misconfigured system. Please read the section 'PERMISSIONS AND UDEV' in the hal_input manpage (btw- I read the manpage, everythign it suggests is already done!!) I have tried rebooting with joypad plugged in, and unplugged, plugging it in after booting. The proc/bus/input/devices output still shows the device exactly correct, but hal can't load it. If I wipe the entire config out and start again, it works fine ..... until reboot... Any suggestions for me? and 2) I also have this in my custom_postgui.hal file: loadrt or2 count=2 loadrt mux4 count=1 addf or2.0 servo-thread addf or2.1 servo-thread addf mux4.0 servo-thread setp mux4.0.in0 0 setp mux4.0.in1 25 setp mux4.0.in2 100 setp mux4.0.in3 200 net remote-speed-slow or2.0.in0 input.0.btn-x net remote-speed-medium or2.1.in0 input.0.btn-y net remote-speed-fast or2.0.in1 or2.1.in1 input.0.btn-b net joy-speed-1 mux4.0.sel0 <= or2.0.out net joy-speed-2 mux4.0.sel1 <= or2.1.out net joy-speed-final halui.jog-speed <= mux4.0.out net joy-x-jog halui.jog.0.analog <= input.0.abs-x-position net joy-y-jog halui.jog.1.analog <= input.0.abs-y-position net joy-z-jog halui.jog.2.analog <= input.0.abs-ry-position EMC2 and AXIS both load just fine (indicating no syntax errors I assume, as when i had syntax errors, it wouldn't load!!) but the joypad doesn't do anything ![]() Any help from the experts here would be SO appreciated!! I have been banging the head against the wall for a few days!! Thanks very much. -James |
|
#2
| |||
| |||
| run EMC from a terminal, after the error message type 'dmesg' hopefully somewhere near the end, it will give a little more info/ Have you confirmed that the file does have root permission? right click the file and check the properties. Chris M |
|
#3
| |||
| |||
| well, of course, this would happen... I went back to check the dmesg and I can't duplicate problem #1 I have shutdown and restarted several times now and it works every time! so until I can replicate, I'll defer problem 1. I still can't get any axis to move (problem #2 in my original post) Anyone have any suggestions on that one? Is my syntax proper? Am I doing it right? (holding down the x, y, or b button while moving the joystick)? THanks for the dmesg suggestion, I'll keep an eye on that for more details if see the first problem crop up again! -James |
|
#4
| |||
| |||
| I would load EMC and then load a halmeter and starting from the joystick button pin check that the pin / signals actually changes when the button is pressed. same for the analog signals, same for the muxed jog speed signals. eventually you will find what is not getting through then we can work on that. |
|
#5
| |||
| |||
| Thanks Chester!! That was all I needed to find my (stupid) error! All the signals were working in the halmeter except the jogs, I went back and found that the custom_postgui.hal file was empty.... There was a backup file that had everything in it, but the main file was empty. I don't know what I did to screw that up, but as soon as I put the data back in the ACTUAL postgui, all worked just right! Sorry to be such a dummy, but your help was everything I needed to help myself!! Thanks again! Have a great weekend! This forum is GREAT! -James |
| Sponsored Links |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Joypad problems. HELP | flash319 | LinuxCNC (formerly EMC2) | 5 | 09-09-2010 11:28 AM |
| Controlling pan/tilt with joypad control | f-x | LinuxCNC (formerly EMC2) | 0 | 01-19-2010 11:02 AM |
| Jogging question | br1 | Mach Mill | 7 | 02-24-2009 08:07 PM |
| HELP to Setup - Mesa 5I20 + Joypad.hal - | TZak | LinuxCNC (formerly EMC2) | 0 | 02-02-2008 04:43 PM |
| Latest BDI with Joypad? | benedict | LinuxCNC (formerly EMC2) | 4 | 11-06-2007 11:59 AM |