FieldPoint Family

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I detect a FieldPoint communication failure from with LabView?

Hi,
I asked this question on the LabView board, but it was suggested I try it here.
 
My LabView application communicates to several FieldPoint modules.  Is it possible to detect a communication failure (for example if the ethernet cable is unplugged, power failure, etc) or a module failure?
 
I tried using the error terminal of the LabView.vi, but was unable to create an error either by unplugging the ethernet cable or turning off power.
 
Thanks for your help.
0 Kudos
Message 1 of 5
(4,050 Views)
As I said in the other thread, if the FP VIs don't return an error when you lose communication, then you will probably need to add a simple communication loop in your code and check for the errors from the TCP VIs. There are examples in the example finder and if you search the site for things like "TCP tutorial" or "messaging protocol".

___________________
Try to take over the world!
0 Kudos
Message 2 of 5
(4,044 Views)

Phil,

Where are you running the LabVIEW code and with what type of network modules. If you are using LabVIEW on a host machine, with a serial network module, the FP Read or FP Write VIs should return error code 32828, "A connection to a remote device timed out." If you are running on the host with an ethernet network module, you would expect to see error code 33162 or 33163 (depends on whether connection was ever established). If you are running embedded LabVIEW code (e.g. The code is running on a [c]FP RT controller), then you will not see an error if the ethernet cable is disconnected. Also, please note that some of the communication failures may return an error code, but not set the error Boolean to true, so you need to look at the error code portion of the error cluster. This is because certain failures are considered non-fatal and are designed to self-recover if possible. For example, if you disconnect and reconnect the ethernet cable, the communications will automatically recover. Also, FieldPoint ethernet communications have a 10 second timeout period, so if you disconnect the ethernet cable for less than 10 seconds, the communications may recover before you have a chance to see the error.


Regards,

Aaron

Message 3 of 5
(4,038 Views)
Aaron,
Thanks for the reply.  I see my problem now.  I was looking for the Boolean error, which was not being set to true.  When I monitor the error code, I see code 33163 when I disconnect the cable (I'm running Labview on a host PC with an ethernet connection to FieldPoint).  I was not aware that the error code could be set without setting the boolean.
 
Thanks again for your help,
phil
0 Kudos
Message 4 of 5
(4,027 Views)

Phil,

Traditionally, the status boolean is set to true indicate an error, and remains false for both no error and warnings. A non-zero error code with the status of false is a warning. Typically, errors will be negative numbers and warnings will be positive numbers.

Regards,

Aaron

0 Kudos
Message 5 of 5
(4,021 Views)