How Can I Disable a Critical System in the Event of a Software Crash? Primary Software: Driver Software>>NI-DAQPrimary Software Version: 6.7.0 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: I have a software control loop controlling a critical system with NI's data acquisition (DAQ) products. How can I generate a hardware event with a DAQ board to shut down my critical system if my control loop dies or if my operating system crashes? Solution: Watchdog timers are used to disable critical systems in the event of a software crash. Watchdogs can serve many purposes; in this case we need the watchdog to monitor a software process and then alert hardware if/when the software process crashes. DAQ boards can accomplish this in many ways. The two examples below illustrate how to implement a watchdog timer using a digital line on the 653x device (digWatchdog.zip) or a counter on an E Series or NI-TIO (660x) device (WatchDog.zip). The first example performs pattern output on a 653x device. The pattern is "0" until the end of the buffer is reached, at which point the pattern switches to "1", toggling the first bit on the first port of the device. When the bit is toggled, we have simulated a software crash. However, if the loop delay in the example is reduced, the bit will not toggle because we have allowed enough time to reset the buffer before the end of the buffer can be reached. The second example generates a delayed pulse on the output of a counter. Inside the loop we reprogram the counter, which tells the counter to start over. As long as the loop cycle time is shorter than the counter delay of the counter's output, we are guaranteed that the counter's output will never toggle. However, when the loop cycle time is lengthened beyond the delay period of the counter, the counter outputs a pulse, simulating a software crash. Related Links: KnowledgeBase 17F9KN8U: FieldPoint Watchdog Timer Questions KnowledgeBase 1YLIO1M6: How Do I Use the Power Up and Watchdog Settings of the FieldPoint Modules Together? KnowledgeBase 2Z97BCPE: Finding Watchdog Examples for LabVIEW RT 7.0 Attachments:
Report Date: 11/30/2000 Last Updated: 04/07/2006 Document ID: 23TBRB4U |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
