Home
Fuse Interrupt Poll Interrupts

Encoder Interrupts

Asynchronously invokes the appropriate function-call subsystem when an encoder interrupt of the Q8 data acquisition system occurs.

Library

qctools

Description




The Encoder Interrupts block for the Q8 series of I/O cards provides a mechanism for handling asynchronous encoder interrupts. Attaching a function-call subsystem to an output causes the function-call subsystem to be executed as soon as the associated encoder 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. 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

FLG1

One of the function-call subsystems attached to this output will execute when FLG1 of associated encoder channel 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. This output is a vector when more than one channel is selected in the Channel(s) to Use parameter. In this case, a demultiplexer must be used to separate the channels.

FLG2

One of the function-call subsystems attached to this output will execute when FLG2 of associated encoder channel 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. This output is a vector when more than one channel is selected in the Channel(s) to Use parameter. In this case, a demultiplexer must be used to separate the channels.

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.

Channel(s) to Use

The channel numbers corresponding to each element of the outputs. For example, if there are 3 channels, then the entry [4,2,0] assigns elment 1 to encoder input 4, element 2 to encoder input 2 and element 3 to encoder input 0. The channel numbers may range from 0 to 7, since there are 8 encoder channels on the Q8 I/O boards.

       
Fuse Interrupt Poll Interrupts