Go to Post (I'm sure that Dave is holding his breath for "welding with Jello".) - jgannon [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 01-03-2010, 16:25
gokul gokul is offline
Registered User
FRC #0571
 
Join Date: Jan 2006
Location: CT
Posts: 25
gokul is an unknown quantity at this point
Can we detect if PSoC is connected or not ?

Hi All,

Is there a way to detect (from within Windriver C/C++) if the PSoC is connected to the Driver Station or not ?

I would like the code to do some functions in the standard mode if there is no PSoC attached. If it is attached then the code will do additional enhanced functions using the enhanced class.

Any ideas?

Thanks
Gopal

Last edited by gokul : 01-03-2010 at 16:25. Reason: changed the title
  #2   Spotlight this post!  
Unread 01-03-2010, 16:49
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: Can we detect if PSoC is connected or not ?

You could jump an input to power and detect if the input is high

I also heard that if you call GetConfiguration (or something like that) and it returns kUnknown then the PSoC is most likely not connected (unless you set that in the ds configuration)
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
  #3   Spotlight this post!  
Unread 02-03-2010, 00:58
Tom Line's Avatar
Tom Line Tom Line is offline
Raptors can't turn doorknobs.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 2,535
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: Can we detect if PSoC is connected or not ?

I know that in labview, if the board is not connected and you have error reporting turned on the first message you get on your user diagnostics screen is one reporting that there is an error or the board is not plugged in.

Since I believe that information is getting packaged up and sent from the robot, I'd wager you can unpackage it on the robot to check it against a string etc.

This is all in labview, however, and I'm not sure what language you're using. I haven't dug deeply into the pre-packaged error information, though I know you can see it in one of the clusters when running the code from your developement computer as well.
  #4   Spotlight this post!  
Unread 02-03-2010, 01:37
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,113
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: Can we detect if PSoC is connected or not ?

Quote:
Originally Posted by Tom Line View Post
I know that in labview, if the board is not connected and you have error reporting turned on the first message you get on your user diagnostics screen is one reporting that there is an error or the board is not plugged in.

Since I believe that information is getting packaged up and sent from the robot, I'd wager you can unpackage it on the robot to check it against a string etc.
Since that message (and the one about the IP address) shows up even if the cRIO isn't turned on, I'm pretty sure it isn't coming from the robot.
  #5   Spotlight this post!  
Unread 03-03-2010, 11:22
gokul gokul is offline
Registered User
FRC #0571
 
Join Date: Jan 2006
Location: CT
Posts: 25
gokul is an unknown quantity at this point
Re: Can we detect if PSoC is connected or not ?

Quote:
Originally Posted by Radical Pi View Post
You could jump an input to power and detect if the input is high

I also heard that if you call GetConfiguration (or something like that) and it returns kUnknown then the PSoC is most likely not connected (unless you set that in the ds configuration)

That sounds good, and I will check on the GetConfig also - Thanks

Gopal
  #6   Spotlight this post!  
Unread 03-03-2010, 11:24
gokul gokul is offline
Registered User
FRC #0571
 
Join Date: Jan 2006
Location: CT
Posts: 25
gokul is an unknown quantity at this point
Re: Can we detect if PSoC is connected or not ?

Quote:
Originally Posted by Tom Line View Post
I know that in labview, if the board is not connected and you have error reporting turned on the first message you get on your user diagnostics screen is one reporting that there is an error or the board is not plugged in.

Since I believe that information is getting packaged up and sent from the robot, I'd wager you can unpackage it on the robot to check it against a string etc.

This is all in labview, however, and I'm not sure what language you're using. I haven't dug deeply into the pre-packaged error information, though I know you can see it in one of the clusters when running the code from your developement computer as well.
My first line says Windriver C/C++ so it is not Labview.

The error message is local to the driver station laptop - it is not coming from the robot (as Alan also points out).
Thanks
Closed Thread


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
Another pneumatics question DPPT1717 Pneumatics 8 11-01-2007 23:38
Another CIM Question Carlo Motors 4 14-02-2005 22:02
Ok another question Rhs953 Motors 2 30-01-2004 23:05
Another Question. Jacob Morgan Electrical 6 05-01-2004 18:32
Another rules question archiver 2001 1 24-06-2002 00:01


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

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