Go to Post Isn't that, April showers bring Woodie Flowers? ;) - jgannon [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
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 18-01-2015, 09:40
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 336
fovea1959 will become famous soon enough
how to identify roboRIO

We have a need to determine the unique roboRIO our code is running on; our test robot does not have a PCM, so we don't want to enable pneumatics if it's running on the test box so we don't flood the console with the CAN timeout errors?

Has anyone hit on a good way to determine the identity of the roboRIO (serial #, or name?)

We're working off the MAC addresses of the network interfaces right now, which is fine, but was curious if anyone had done it a different way.
Reply With Quote
  #2   Spotlight this post!  
Unread 18-01-2015, 11:01
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 358
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Re: how to identify roboRIO

I think I would put a switch on a digital input, or just a pigtail of wire that connects the input to ground. If it reads a false, then its execute code accordingly.
__________________
Brian K
Team 1225 Robotics Mentor
Reply With Quote
  #3   Spotlight this post!  
Unread 18-01-2015, 11:34
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 336
fovea1959 will become famous soon enough
Re: how to identify roboRIO

That's a better idea than our thought of going off the roboRIO id. Doing it your way, if we have to swap roboRIOs, then we don't need to touch code, just make sure the "I am a test chassis" jumper is NOT in place. When I read this, I first thought of putting a "I am the competition chassis" jumper in place, but if the jumper got lost, then we'd lose time making up one at a competition, so "I am a test chassis" it is. I suspect we'll have enough DIO to get us by....

My curiousity *is* piqued, though, so if anyone has a way to do it, I'm interested. I remember that it was possible to pull the serial number from LabVIEW. I suspect they never put the appropriate 'hook' into wpilibj to expose that functionality, though I suspect a clever person with the right documentation could pull it off using HALUtil and friends....

Last edited by fovea1959 : 18-01-2015 at 11:40.
Reply With Quote
  #4   Spotlight this post!  
Unread 18-01-2015, 20:53
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,586
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: how to identify roboRIO

You can use the team number to differentiate. http://wpilib.screenstepslive.com/s/...015#TeamNumber
Reply With Quote
  #5   Spotlight this post!  
Unread 18-01-2015, 22:06
ThomasClark's Avatar
ThomasClark ThomasClark is offline
Registered User
FRC #0237
 
Join Date: Dec 2012
Location: Watertown, CT
Posts: 146
ThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud ofThomasClark has much to be proud of
Re: how to identify roboRIO

You could also just use the Preferences class with an enablePcm boolean variable.
Reply With Quote
  #6   Spotlight this post!  
Unread 19-01-2015, 09:20
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 336
fovea1959 will become famous soon enough
Re: how to identify roboRIO

Joe, Thomas, thanks...
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


All times are GMT -5. The time now is 18: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