Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Logitech Dual Action (Axis Issue) (http://www.chiefdelphi.com/forums/showthread.php?t=81625)

j.cole 31-01-2010 22:45

Logitech Dual Action (Axis Issue)
 
I'm hiving an issue with finding the axis numbers when programming. heres the flow; Joystick Get (Axes), unbundle by name, then we need 3 axes (we need to know what the X&Y axes are off of the right and left joysticks (possibilities; Axis 1(x), Axis 2(y), Axis 3 (throttle), Axis 4, Axis 5, Axis 6))

Note we are using Holonomic drive system (aka Mecanum wheels)

----------------
Now playing: Handsome Boy Modeling School - I've Been Thinking (Instrumental)
via FoxyTunes

Alan Anderson 01-02-2010 04:31

Re: Logitech Dual Action (Axis Issue)
 
The X axis is, as you probably could guess, Axis 1(x). The Y axis is similarly obvious as Axis 2(y). I don't know what third axis you are looking for.

However, the Holonomic drive vi doesn't want Joystick axis inputs. It wants a magnitude (0 to 1), a direction in degrees (0 to 360), and a turn rate (-1 to 1). You can do the Cartesian to polar conversion math yourself, or you can use the "Re/Im to r/theta" complex number vi to turn X and Y axis numbers into a magnitude and direction in radians, then scale the direction appropriately.

An upcoming update to the WPI libraries is supposed to include a version of Holonomic drive that does take Joystick axis inputs more directly.

j.cole 01-02-2010 23:15

Re: Logitech Dual Action (Axis Issue)
 
Quote:

Originally Posted by Alan Anderson (Post 911025)
The X axis is, as you probably could guess, Axis 1(x). The Y axis is similarly obvious as Axis 2(y). I don't know what third axis you are looking for.

However, the Holonomic drive vi doesn't want Joystick axis inputs. It wants a magnitude (0 to 1), a direction in degrees (0 to 360), and a turn rate (-1 to 1). You can do the Cartesian to polar conversion math yourself, or you can use the "Re/Im to r/theta" complex number vi to turn X and Y axis numbers into a magnitude and direction in radians, then scale the direction appropriately.

Top part- I understand X axis is 1(x) & opposite with 2 but which joysticks are those or is it the d pad (a logitech dual action has 6 axes (dpad(2)+left joy.(2)+right joy.(2)=6))

Bottom Part- I already have that long conversion in a sub vi that works

----------------
Now playing: Stevie Ray Vaughan - Tin Pan Alley (aka Roughest Place In Town) (Live)
via FoxyTunes

Alan Anderson 02-02-2010 10:17

Re: Logitech Dual Action (Axis Issue)
 
Quote:

Originally Posted by j.cole (Post 911595)
Top part- I understand X axis is 1(x) & opposite with 2 but which joysticks are those or is it the d pad (a logitech dual action has 6 axes (dpad(2)+left joy.(2)+right joy.(2)=6))

I don't understand the question. I think some sentence punctuation would go a long way towards helping me to read what you're asking.

But since you're using LabVIEW, you can get the answer yourself with very little work. It's really simple to connect the output of the Joystick Get vi to a front panel indicator, then just observe what responds when you move the various controls.

j.cole 02-02-2010 16:06

Re: Logitech Dual Action (Axis Issue)
 
1 Attachment(s)
Yeah thats what I was just thinking about doing while walking home.

Thanks for all your help when i find out what they do ill post them here and that will be the end of it

(if someone would check over the code in the attachment i cant figure out whats going on (i know its set to usb 3 thats because i tried all others and 3 was set when i took the screen cap)

Alan Anderson 02-02-2010 21:16

Re: Logitech Dual Action (Axis Issue)
 
1 Attachment(s)
LabVIEW can put whole bundles in the front panel at once. To make this vi, all I did was right-click on the Axes and Buttons terminals of the Joystick Get and choose Create Indicator.


All times are GMT -5. The time now is 11:57.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi