Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

The Industrial Feature Set: Watchdog Timers

5 ratings | 3.20 out of 5
Print

Overview

This document is part of a comprehensive tutorial on industrial Digital I/O and Counter/Timer hardware. Learn about National Instruments product offerings for digital and timing I/O, the Industrial Feature Set including watchdog timers and isolation, complementary devices like relays, solenoids and encoders, concepts like sinking and sourcing, and see how these devices can be used in your industrial application.

For more information return to the Complete Industrial Digital I/O and Counter/Timer Tutorial.

What is a Watchdog Timer?

Control systems typically require redundancy or fail-safe mechanisms of some kind. In the event of the unexpected failure of some component of the system, the fail-safe mechanism will take over and place the system into a known safe-state. The digital I/O watchdogs on NI’s new industrial digital products provide a method for supplying such a mechanism.

Recommended Products that Feature Watchdog Timers


NI 6509
NI 6514
NI 6515
NI 6528

How Watchdog Timers Work


The digital board constantly receives confirmation that the computer is still functioning properly. If this confirmation is not received within a programmable timeout, the safe states are written to the outputs. Figure 1 below shows the flow of information during normal operation.


[+] Enlarge Image

Figure 1: Watchdog timer flowchart showing separate hardware and software levels


Once the watchdog is configured and started, the software application must continuously reset the timer to avoid expiration. This is done with the NI-DAQmx Control Watchdog Task VI as shown in figure 2. This reset serves as the confirmation discussed above.



Figure 2: Configuring and Resetting watchdog timer


In the continued flow chart in figure 3, if a fault occurs (such as the computer hanging), the hardware will continue to count down until the timeout expires. At this time, the predefined safe states are written to the outputs, and all future writes are ignored.


[+] Enlarge Image

Figure 3: Flowchart showing watchdog timer expiration


In order for the board to become responsive to hardware commands again, the expiration must be cleared, again using the DAQmx Control Watchdog Task VI as in figure 4.



Figure 4. Clearing the Expiration
5 ratings | 3.20 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).