Go to Post Don't fight bureaucratic morons... embrace them! Humour and publicity will take care of the rest. - dtengineering [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-02-2010, 10:10
EricWilliams EricWilliams is offline
Registered User
FRC #2039 (Rockford Robotics)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2001
Location: Rockford, IL
Posts: 103
EricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of light
Joystick 2

Has anyone experienced the following:

Open a new joystick attached to USB2 and set RefNum name for it. Get the joystick device associated with that RefNum name, but it comes back as another USB device (e.g. USB1).

On the driver station, the panel shows 2 separate devices, and pressing buttons on each one causes the indicators on the corresponding joystick lights to blink (effectively showing the classmate is reading two separate devices that are working correctly).

Probing the wire output of the Joystick's Open.vi shows a USB1 device channel, even though USB2 is clearly wired to the input.

Suggestions?
Reply With Quote
  #2   Spotlight this post!  
Unread 23-02-2010, 11:32
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: Joystick 2

Quote:
Originally Posted by EricWilliams View Post

Probing the wire output of the Joystick's Open.vi shows a USB1 device channel, even though USB2 is clearly wired to the input.

Suggestions?
There is nothing must going on in the Joystick Open.vi
It just copies what is wired in into a cluster that just contains the device channel enum.

If you open a blank VI (without a project) Close your robot project and open a blank VI that will just run on your desk top not the cRIO.
Place a Joystick Open.vi in it and create an input control and an output indicator.
Run and see if you see the same results USB2 in but USB1 out. You can do multiple copies (4) of Joystick Open and try all 4 USB at the same time.

If you see the same results then I think the problem is with the TypeDef of the enum (USB1, USB2, USB3, USB4) DeviceEnum.ctl
Check to see if it is still connected to the type def.
Is the constant enum that you are feeding into the Open VI also still connected to the SAME type def

Are the items in the type def still
USB1 = 0
USB2 = 1
USB3 = 2
USB4 = 3

Plus is everything still a U16 data type?

These are the only things that I can think of that cause the Open VI to output USB1 even though USB2 is clearly wired to the input
Attached Thumbnails
Click image for larger version

Name:	joystickOpen.png
Views:	33
Size:	2.0 KB
ID:	8786  
__________________
Omar

Last edited by Omar : 23-02-2010 at 11:34.
Reply With Quote
  #3   Spotlight this post!  
Unread 23-02-2010, 12:59
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Joystick 2

Quote:
Originally Posted by EricWilliams View Post
Has anyone experienced the following:

Open a new joystick attached to USB2 and set RefNum name for it. Get the joystick device associated with that RefNum name, but it comes back as another USB device (e.g. USB1).
I recently helped a team resolve symptoms that perfectly match what you describe. I'm 99% sure you have a minor mismatch in the RefNum names. Look for extra leading or trailing spaces, or upper/lower case differences.
Reply With Quote
  #4   Spotlight this post!  
Unread 23-02-2010, 13:39
EricWilliams EricWilliams is offline
Registered User
FRC #2039 (Rockford Robotics)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2001
Location: Rockford, IL
Posts: 103
EricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of light
Re: Joystick 2

Quote:
Originally Posted by Alan Anderson View Post
I recently helped a team resolve symptoms that perfectly match what you describe. I'm 99% sure you have a minor mismatch in the RefNum names. Look for extra leading or trailing spaces, or upper/lower case differences.
Alan, we will check this out at our next meeting. Thanks for the reply!
Reply With Quote
  #5   Spotlight this post!  
Unread 23-02-2010, 14:44
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Joystick 2

Quote:
Originally Posted by EricWilliams View Post
Probing the wire output of the Joystick's Open.vi shows a USB1 device channel, even though USB2 is clearly wired to the input.
Quote:
Originally Posted by Omar View Post
[...a good list of highly unlikely things to check...]
These are the only things that I can think of that cause the Open VI to output USB1 even though USB2 is clearly wired to the input
The Begin vi is called only once. Probes I try to place there after it has already run always show the default values. It looks like the actual values on the wires go away once they are no longer needed.
Reply With Quote
  #6   Spotlight this post!  
Unread 24-02-2010, 08:26
Doug Norman's Avatar
Doug Norman Doug Norman is offline
Registered User
no team (National Instruments)
Team Role: Engineer
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Austin, TX
Posts: 136
Doug Norman will become famous soon enoughDoug Norman will become famous soon enough
Re: Joystick 2

One thing you can do to keep wire values (for probing) after you run, is to press the "Retain Wire Values" button. It's the button next to the "Highlight Execution" (lightbulb) button. But be aware this can use a lot of memory if you have huge data arrays.
Reply With Quote
  #7   Spotlight this post!  
Unread 24-02-2010, 12:01
Ziaholic's Avatar
Ziaholic Ziaholic is offline
Elec/SW Mentor
AKA: Marc
FRC #1164 (Project NEO)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2002
Location: Las Cruces, NM
Posts: 194
Ziaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the roughZiaholic is a jewel in the rough
Re: Joystick 2

Could this also be related to that Joystick list on the DriverStation application? (I think it's in the Diagnostics tab)

You can select one of the USB devices and drag it up or down and re-assign which joystick is which. I've often wondered how this gets implemented since it overrides the USB assignments made in the Begin VI.
__________________
----
There are 10 types of people. Those who understand binary, and those that do not.
Team #1164 - Project NEO Robotics
Reply With Quote
  #8   Spotlight this post!  
Unread 24-02-2010, 15:05
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: Joystick 2

The JoySticks are assign USB number based on the serial number of each USB Joystick. Windows remembers which actual phyical joystick was assigned which USB# based on the serial number of the joystick.

So when you drag the joysticks around in the Diagnostics tab you are tell the system that you want the joystick with serial number XXXXXXXX to be USB1 and the joystick with serial number YYYYYYY to be USB2. So when in the Begin.VI you know which phyical joystick you are opening

You do not need to know the serial number the Diagnostics tab takes care of that.
__________________
Omar
Reply With Quote
  #9   Spotlight this post!  
Unread 24-02-2010, 20:06
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Joystick 2

USB joysticks can have serial numbers, but due to cost issues, they rarely do. Instead, the vendor and product info identifies them, with the order they are identified on the bus being the id for identical joysticks.

This doesn't really affect what you are saying except that there are corner cases which will not work as you might expect -- for example, unplug the hub, swap two identical joysticks within the hub, replug the hub, and the computer can't tell that anything changed. If they had serial numbers, the joystick values would follow the serial numbers. Without serial numbers, they are tied to the port.

Greg McKaskle
Reply With Quote
  #10   Spotlight this post!  
Unread 25-02-2010, 09:54
Omar's Avatar
Omar Omar is offline
Registered User
no team
Team Role: Mentor
 
Join Date: Dec 2008
Rookie Year: 2008
Location: Huntsville, AL
Posts: 122
Omar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of lightOmar is a glorious beacon of light
Re: Joystick 2

I wish my test rack that has 24 USB power supplies worked that way.
Based on the USB port instead of the serial number.

Every time the CAL shop calibrates the supplies and does not put them back a the correct spot it screws up the addressing.
__________________
Omar
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Joystick Danny McC Control System 2 03-02-2007 18:21
1 joystick or 2? ChrisMcK2186 Control System 18 19-01-2007 23:42
joystick ? _GP_ General Forum 1 26-02-2004 23:10
Joystick cammie825 Technical Discussion 1 15-01-2003 10:48
No Joystick archiver 2001 2 24-06-2002 01:14


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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