12-29-2010 10:36 AM
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.
01-03-2011 01:08 PM
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.
01-03-2011 01:47 PM
Could you help me with some example thanks
01-03-2011 02:49 PM
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.
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.