Home
Analog Status Extensive Simulink Library

Encoder Status

Returns the status of the encoders on the Q8 terminal board.

Library

qctools

Description




The Encoder Status block for the Q8 series of I/O cards provides a mechanism for checking the status of the encoders on the Q8 terminal board. The block queries the Status Register each sampling instant. Note that unlike the Interrupt Status Register, the status flags are not latched. Hence, some flags appear as very brief pulses and may be missed. Use the Poll Encoder Interrupts block to catch these brief pulses, or use the Read Encoder Flags block in Encoder Extras, which presents a different set of status flags that are more readily queried. The Status series of blocks may be used in Windows regardless of the status of the Q8 Windows driver.

Block Outputs

FLG1

The output reflects FLG1 of the selected encoder channel. The value of FLG1 may be configured using an Encoder Input block or the Configure Encoder I/O block.

FLG2

The output reflects FLG2 of the selected encoder channel. The value of FLG2 may be configured using an Encoder Input block or the Configure Encoder I/O block.

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

The encoder channel whose flags are being queried. The channel number may range from 0 to 7, since there are 8 encoder channels on the Q8 I/O boards.

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.

       
Analog Status Extensive Simulink Library