Home
Analog Input External Time Base Counter Interrupt

Interrupts

Asynchronously invokes the appropriate function-call subsystem when one of the 55 possible interrupts of the Q8 data acquisition system occurs.

Library

qctools

Description




The Interrupts block for the Q8 series of I/O cards provides a mechanism for handling asynchronous interrupts. Attaching a function-call subsystem to an output causes the function-call subsystem to be executed as soon as the associated interrupt occurs. The code executes asychronously from the rest of the model. The timing of its execution is not governed by the sampling period of the system. Note that one of the more specific Asychronous 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.

Note that the Asynchronous Interrupt blocks may only be used in Windows if the Q8 Windows driver has been converted to an RTX driver using Convert To RTX in the RTX Properties control panel. One of the Time Base blocks is also required in the model for these blocks to be used.

Block Outputs

ENC0FLG1

The function-call subsystem attached to this output will execute when FLG1 of encoder channel 0 goes high. The interrupt is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC0FLG2

The function-call subsystem attached to this output will execute when FLG2 of encoder channel 0 goes high. The interrupt is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC1FLG1

The function-call subsystem attached to this output will execute when FLG1 of encoder channel 1 goes high. The interrupt is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC1FLG2

The function-call subsystem attached to this output will execute when FLG2 of encoder channel 1 goes high. The interrupt is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC2FLG1

The function-call subsystem attached to this output will execute when FLG1 of encoder channel 2 goes high. The interrupt is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC2FLG2

The function-call subsystem attached to this output will execute when FLG2 of encoder channel 2 goes high. The interrupt is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC3FLG1

The function-call subsystem attached to this output will execute when FLG1 of encoder channel 3 goes high. The interrupt is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC3FLG2

The function-call subsystem attached to this output will execute when FLG2 of encoder channel 3 goes high. The interrupt is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC4FLG1

The function-call subsystem attached to this output will execute when FLG1 of encoder channel 4 goes high. The interrupt is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC4FLG2

The function-call subsystem attached to this output will execute when FLG2 of encoder channel 4 goes high. The interrupt is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC5FLG1

The function-call subsystem attached to this output will execute when FLG1 of encoder channel 5 goes high. The interrupt is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC5FLG2

The function-call subsystem attached to this output will execute when FLG2 of encoder channel 5 goes high. The interrupt is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC6FLG1

The function-call subsystem attached to this output will execute when FLG1 of encoder channel 6 goes high. The interrupt is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC6FLG2

The function-call subsystem attached to this output will execute when FLG2 of encoder channel 6 goes high. The interrupt is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC7FLG1

The function-call subsystem attached to this output will execute when FLG1 of encoder channel 7 goes high. The interrupt is edge-triggered. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ENC7FLG2

The function-call subsystem attached to this output will execute when FLG2 of encoder channel 7 goes high. The interrupt is edge-triggered. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

ADC03EOC

The function-call subsystem attached to this output will execute when the end-of-conversion signal of ADC03 goes high. ADC03 handles analog input channels 0-3. The interrupt is edge-triggered. An end-of-conversion pulse occurs once for each channel converted.

ADC47EOC

The function-call subsystem attached to this output will execute when the end-of-conversion signal of ADC47 goes high. ADC47 handles analog input channels 4-7. The interrupt is edge-triggered. An end-of-conversion pulse occurs once for each channel converted.

ADC03RDY

The function-call subsystem attached to this output will execute when the ready signal of ADC03 goes high. ADC03 handles analog input channels 0-3. The interrupt is edge-triggered. The ready signal goes high only after all the selected channels in this range have been converted.

ADC47RDY

The function-call subsystem attached to this output will execute when the ready signal of ADC47 goes high. ADC03 handles analog input channels 4-7. The interrupt is edge-triggered. The ready signal goes high only after all the selected channels in this range have been converted.

CNTROUT

The function-call subsystem attached to this output will execute when the general purpose counter output goes low. The interrupt 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 function-call subsystem attached to this output will execute when the watchdog counter output goes low. The interrupt 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 function-call subsystem attached to this output will execute when the fuse on the Q8 terminal board blows or degrades such that the +5V power on the terminal board falls below 4V. The interrupt 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 function-call subsystem attached to this output will execute when a rising or falling edge occurs on the EXT_INT line. The "EXT_INT polarity" option selects the edge on which to invoke the function-call subsystem.

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.

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 execution of the function-call subsystem. Otherwise a rising edge triggers its execution. 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.

       
Analog Input External Time Base Counter Interrupt