Home
Encoder Interrupts Poll Counter Interrupt

Poll Interrupts

Polls all the interrupts of the Q8 data acquisition system for which the associated output port is connected.

Library

qctools

Description




The Poll Interrupts block for the Q8 series of I/O cards provides a mechanism for polling any of the interrupt sources of the card. It reads the Interrupt Status Register of the Q8 card. Connecting an output to another block causes that interrupt source to be polled. The output goes high when the associated interrupt occurs. The block has an option for resetting the interrupt flag after an interrupt occurs. The block polls the Interrupt Status Register each sampling instant. Note that one of the more specific Poll Interrupt blocks is generally used, unless a large number of interrupt sources are employed. To prevent warnings from Simulink, put a Terminator block on unused outputs. The Poll Interrupts series of blocks may be used in Windows regardless of the status of the Q8 Windows driver.

Refer to the help on the "EXT_INT acts as watchdog" parameter for information on how to have the watchdog timer on one Q8 acts as a watchdog for a set of Q8 cards.

Block Outputs

ENC0FLG1

The output goes high when FLG1 of encoder channel 0 goes high. The output is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC0FLG2

The output goes high when FLG2 of encoder channel 0 goes high. The output is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC1FLG1

The output goes high when FLG1 of encoder channel 1 goes high. The output is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC1FLG2

The output goes high when FLG2 of encoder channel 1 goes high. The output is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC2FLG1

The output goes high when FLG1 of encoder channel 2 goes high. The output is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC2FLG2

The output goes high when FLG2 of encoder channel 2 goes high. The output is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC3FLG1

The output goes high when FLG1 of encoder channel 3 goes high. The output is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC3FLG2

The output goes high when FLG2 of encoder channel 3 goes high. The output is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC4FLG1

The output goes high when FLG1 of encoder channel 4 goes high. The output is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC4FLG2

The output goes high when FLG2 of encoder channel 4 goes high. The output is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC5FLG1

The output goes high when FLG1 of encoder channel 5 goes high. The output is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC5FLG2

The output goes high when FLG2 of encoder channel 5 goes high. The output is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC6FLG1

The output goes high when FLG1 of encoder channel 6 goes high. The output is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC6FLG2

The output goes high when FLG2 of encoder channel 6 goes high. The output is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC7FLG1

The output goes high when FLG1 of encoder channel 7 goes high. The output is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC7FLG2

The output goes high when FLG2 of encoder channel 7 goes high. The output is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ADC03EOC

The output goes high when the end-of-conversion signal of ADC03 goes high. ADC03 handles analog input channels 0-3. The output is edge-triggered. An end-of-conversion pulse occurs once for each channel converted.

ADC47EOC

The output goes high when the end-of-conversion signal of ADC47 goes high. ADC47 handles analog input channels 4-7. The output is edge-triggered. An end-of-conversion pulse occurs once for each channel converted.

ADC03RDY

The output goes high when the ready signal of ADC03 goes high. ADC03 handles analog input channels 0-3. The output is edge-triggered. The ready signal goes high only after all the selected channels in this range have been converted.

ADC47RDY

The output goes high when the ready signal of ADC47 goes high. ADC47 handles analog input channels 4-7. The output is edge-triggered. The ready signal goes high only after all the selected channels in this range have been converted.

CNTROUT

The output goes high when the general purpose counter output goes low. The output is edge-triggered. The falling edge is used because the external CNTR_OUT pin is held high when the counter output is disabled. Hence, a falling edge is the most natural transition on which to interrupt the CPU.

WATCHDOG

The output goes high when the watchdog counter output goes low. The output is edge-triggered. The falling edge is used because the external WATCHDOG pin is held high when the watchdog output is disabled. Hence, a falling edge is the most natural transition on which to interrupt the CPU.

FUSE

The output goes high when the fuse on the Q8 terminal board blows or degrades such that the +5V power on the terminal board falls below 4V. The output is edge-triggered. Note that the fuse also acts as a hard watchdog. Failure of the fuse causes all analog outputs to be zeroed and all digital lines to be pulled high.

EXTINT

The output goes high when a rising or falling edge occurs on the EXT_INT line. The "EXT_INT polarity" option selects the active edge of the EXT_INT line.

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.

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.

EXT_INT Polarity

Polarity of the EXT_INT input. If this option is not checked then a falling edge on the EXT_INT input triggers the EXTINT output going high. Otherwise a rising edge is the trigger. The EXT_INT line has a pullup resistor to bring it high when the input is unconnected. Hence, this option is normally unchecked by default.

EXT_INT Acts as Watchdog

If this option is checked then an edge on the EXT_INT input causes the analog outputs to be reset and the digital I/O lines to be pulled high. This option is useful for connecting limit switches and emergency stop buttons to the Q8. It can also be used to have the watchdog timer of one Q8 board act as a watchdog for a whole set of Q8 boards. To do so, use a Watchdog block on the "master" with the "Enable external output" option enabled. Then use a Poll Interrupts, Poll External Interrupt or External Status block with the "EXT_INT acts as watchdog" option checked for the slave boards.

Clear Flags After Polling

When this option is checked, the block clears the polled bits of the Interrupt Status Register after reading them. This option allows the flags to be repeatedly polled. Active outputs will remain high for one sampling instant when this option is checked. Otherwise, an output stays high once it has gone high. Note that the Poll Interrupts blocks can be used to poll status flags, such as A/D end-of-conversion flags, that would otherwise be too fast to detect.

       
Encoder Interrupts Poll Counter Interrupt