Home
Encoder Reset (edge-triggered with enable) Configure Encoder I/O

Measure Average Period

Measures the average period of a digital signal applied to the CNT input of one of the encoder DIN connectors.

Library

qctools

Description




The Measure Average Period for the Q8 series of I/O cards provides a mechanism for using the 24-bit encoder counters on an installed Q8 I/O card to measure the period of a digital input signal. To use the block, connect the digital signal of interest to the A/CNT input on the DIN connector of the selected encoder input. Wire the B/DIR input high. The I/LD input is ignored and may be left unconnected. Use the power supplied on the terminal board (GND and +5V are available right on the DIN connector itself. It is recommended that they be used to wire B/DIR high by tying B/DIR to +5V). Note that the block assumes that it is invoked at the specified sampling rate, so any variation in that rate will affect the measurement.

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 to Use

The channel to be measured. 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. In this case, the block computes the average period each sampling instant. 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.

       
Encoder Reset (edge-triggered with enable) Configure Encoder I/O