CNCzone.com-The Largest Machinist Community on the net!



Home Page Mark Forums Read Today's Posts My Replies Classifieds Reviews Photo Gallery Web Links Share Files Advertise With Us Ad List
Go Back   CNCzone.com-The Largest Machinist Community on the net! > Machine Controllers Software and Solutions > LinuxCNC (formerly EMC2)


LinuxCNC (formerly EMC2) Discuss LinuxCNC (formerly EMC2) Controlers here!


This forum is sponsored by:

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Ban this user!
Old 01-14-2011, 08:31 PM
 
Join Date: May 2009
Location: USA
Posts: 19
jcizek is on a distinguished road
New here, question on Joypad for jogging

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
:1: hal_input exited without becoming ready

(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
Reply With Quote

  #2   Ban this user!
Old 01-14-2011, 08:58 PM
 
Join Date: Nov 2005
Location: Canada
Posts: 465
chester88 is on a distinguished road

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
Reply With Quote

  #3   Ban this user!
Old 01-14-2011, 09:13 PM
 
Join Date: May 2009
Location: USA
Posts: 19
jcizek is on a distinguished road

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
Reply With Quote

  #4   Ban this user!
Old 01-14-2011, 09:30 PM
 
Join Date: Nov 2005
Location: Canada
Posts: 465
chester88 is on a distinguished road

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.
Reply With Quote

  #5   Ban this user!
Old 01-14-2011, 09:52 PM
 
Join Date: May 2009
Location: USA
Posts: 19
jcizek is on a distinguished road

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
Reply With Quote

Sponsored Links
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On


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




All times are GMT -5. The time now is 05:01 AM.





Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO
Template-Modifications by TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361