Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Can we detect if PSoC is connected or not ? (http://www.chiefdelphi.com/forums/showthread.php?t=83742)

gokul 01-03-2010 16:25

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

Radical Pi 01-03-2010 16:49

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)

Tom Line 02-03-2010 00:58

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.

Alan Anderson 02-03-2010 01:37

Re: Can we detect if PSoC is connected or not ?
 
Quote:

Originally Posted by Tom Line (Post 930371)
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.

gokul 03-03-2010 11:22

Re: Can we detect if PSoC is connected or not ?
 
Quote:

Originally Posted by Radical Pi (Post 930115)
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

gokul 03-03-2010 11:24

Re: Can we detect if PSoC is connected or not ?
 
Quote:

Originally Posted by Tom Line (Post 930371)
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


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

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