Some real-time controllers contain a built-in hardware timer known as a
watchdog timer
or a dead man's switch that interfaces with the embedded software application. If your real-time controller contains a watchdog timer, you can incorporate recovery procedures in your real-time VI to detect software failures and to ensure that the software process continues to execute in a defined state in case of software failures.
What to Use
Real-Time Watchdog Timer Nodes
What to Do
Create the following diagram to incorporate recovery procedures in your real-time VI.
Customize the gray sections for your unique programming goals.
|
Configure a watchdog timer object using the
Watchdog Timer Configure
node. The watchdog timer starts counting down as soon as the
Watchdog Timer Configure
node executes.
You can define the recovery procedure in the
expiration actions
input of the node. In this example, the node restarts the current application on the controller when the watchdog timer expires. You also can configure the node to perform other actions in case of expiration, such as restarting the real-time controller.
|
|
Use the
Watchdog Timer Restart
node to periodically reset the watchdog timer to prevent the timer from expiring and triggering the recovery procedure. If a software failure prevents the application from resetting the watchdog timer, the timer eventually expires and triggers the recovery procedure.
|
|
Use the
Watchdog Timer Clear
node to reset and close the watchdog timer object. You must close the current object before using another one.
|