Watchdog
Programs the watchdog timer of the Q8 data
acquisition system.
Library
qctools
Description

The Watchdog Module for the Q8 series of I/O
cards provides a mechanism for using the watchdog timer on an
installed Q8 I/O card. If the watchdog expires, then the analog
outputs are reset to 0V and the digital outputs are reconfigured as
digital inputs and pulled high. Hence, all digital outputs go high on
watchdog expiration. The output of the block goes from zero to one at
the next sampling instant. To stop the model on watchdog expiration,
connect a Stop Simulation or Stop With Error block to the output of
the Watchdog module.
Parameters and Dialog Box

Board Number
The board number of the I/O card. If
there is only one Q8 board in your system, then the board number
should be zero. The second Q8 board in your system is board number 1,
etc.
Timeout Interval
The watchdog timer is a 32-bit
counter. It supports any timeout period from 60 ns to 257.69803776
seconds (4.3 minutes) in 60 ns units. The period is generally
programmed to be more than the sampling period of the model, but
small enough that the model stops quickly after the watchdog expires.
The output of the block changes at the next sampling instant after
the watchdog timer expires.
The Watchdog Interrupt block may also
be used to act on watchdog expiration. The Watchdog Interrupt block
is an asynchronous block that is executed immediately upon expiration
of the watchdog timer, independent of the sampling period of the
model.
Sample Time
A sample time must be specified for
all discrete blocks. The default value extracts the sample time from
the RTW Options dialog, under Solver/Fixed step size. A numeric value
rather than 'auto' should be specified in this dialog field for this
default to make sense.
Enable WATCHDOG Output
Checking this option enables output of
the watchdog state to the WATCHDOG pin on the CONTROL header of the
Q8 terminal board. The output remains high as long as the watchdog
timer has not expired. If the watchdog expires then the output goes
low. This signal can be used to shut off external hardware, such as
current amplifiers for robot motors.
It can also be fed to the EXT_INT pin
of other Q8 cards (available on the CONTROL header of the Q8 terminal
board) in order to propagate the watchdog functionality to the other
cards. Use one of the External Interrupt, External Status or Poll
External Interrupt blocks with the other cards and check the "EXT_INT
acts as watchdog" option. When EXT_INT is configured as a
watchdog, a falling-edge on the EXT_INT line causes all the analog
outputs of the card to be reset to zero and all the digital I/O lines
to be pulled high, just like a watchdog timer. The EXT_INT line can
also be programmed to act upon a rising edge.
|