FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I programmatically determine if fieldpoint is powered up?

I am using two cFP-1808s and programming in VS 2005 C#. Is there any way to determine in code wether the cFP-1808s are powered on? I am using datasockets to read data and have discovered that if you connect to a datasourse that does not exist, the server crates the data source with a default value of 0. This causes a problem when I try to disconnect, the programs just hangs after the datasocket.disconnect() command.

 

Willy

0 Kudos
Message 1 of 7
(7,220 Views)
Really there is no way to know other than getting a timeout error when you try to communicate with it.
Chris Bakker
SET Americas
CEO

0 Kudos
Message 2 of 7
(7,136 Views)

Then why is it allowed to connect to a datasource that does not exsist?

 

Willy

0 Kudos
Message 3 of 7
(7,118 Views)

Even datasocket should give you an error message, if an address is not correct, because the module is not there or its a different module, or network is down or the 180x is not powered up correctly.

So checking the status comming back  from your datasocket function should fix this issue.

 

 

DirkW

0 Kudos
Message 4 of 7
(7,100 Views)
Unfortunately, this is not the case. The DataSocket.Connect returns void and only throws the System.ObjectDisposedException. Furthermore, the Measurement Studio help file states ". . . if you connect to a data sourse that does not exist, the server creates the data source with a default value of 0."
0 Kudos
Message 5 of 7
(7,090 Views)
You are correct Willy, an offline controller doesn't give an error.  You can try pinging the device, either by using a generic TCP write function or using RT Ping Controllers.VI, which will find all NI controllers on your subnet and return info about them in a cluster of string arrays.  If it is not found by this VI, it is not powered on.
Chris Bakker
SET Americas
CEO

0 Kudos
Message 6 of 7
(7,082 Views)

I found the RT System Replication VIs very useful in detecting whether a RT target is online. Check the article below. 

 

http://zone.ni.com/devzone/cda/tut/p/id/3937

 

Volker

 

 

0 Kudos
Message 7 of 7
(6,970 Views)