LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Methods to detect loss of connection with CRIO

I am developing an application with CRIO. The CRIO has an application in real time in which you are sharing a variable temperature. In my host PC I have an application that will receive this temperature and stored in a database. I need to detect the beginning of my program if present the CRIO and prompting a loss of connection and the system can not initialize.

0 Kudos
Message 1 of 4
(2,579 Views)

A "watchdog" is what you want.  Continuously update a shared variable in the cRIO.  The HMI application reads the shared variable and triggers an alarm if the value does not change within a set period of time.

 

If you are not using shared variables, substitute your own method.

0 Kudos
Message 2 of 4
(2,539 Views)

Could you help me with some example thanks

0 Kudos
Message 3 of 4
(2,535 Views)

cRIO.JPG  This is the cRIO code.  All it does is continuously update a variable that can be read by the HMI.  It is important that this loop runs faster than the HMI loop to prevent false alarms.

 

HMI.JPG  The HMI code may look something like this.  It is reading the variable being written to by the cRIO.  If it does not change, the communication code is not running.  You would probably want to do something if Comm's Lost goes true other than turn on an indicator.

 

There are many ways to do this and you may receive some better ideas from the forum.

0 Kudos
Message 4 of 4
(2,531 Views)