National Instruments PCI/PXI-6602 Incremental Encoder

PCI/PXI-6602 Incremental Encoder block


Simulink® Real-Time™ Library for National Instruments®

Block Parameters


From the list, select a channel number between 1 and 8.

Number the lines beginning with 1 even if this board manufacturer starts numbering the ports with 0.

    Note:   If you want to attach a 3-wire encoder, do so by connecting the channel A signal to a SOURCE pin, the channel B signal to the AUX pin, and the index signal to the GATE pin.

Counting mode

From the list, select a counting mode. See the Choose one of the following:

  • Normal

  • Quadrature Mode X1

  • Quadrature Mode X2

  • Quadrature Mode X4

  • Two-pulse mode

  • Synchronous Source Mode

This parameter specifies the counting mode for the board. See the National Instruments PCI/PXI®-6602 user manual documentation for details and definitions of these modes.

Initial count

The initial count specifies the initial value for the counter. Enter a nonnegative integer.

Reload at index pulse

Select this check box to have the count value reset to the value of Initial count at each index pulse.

Index phase

If the Reload at index pulse check box is selected, the Index phase parameter specifies the phase of the quadrature signals during which the count will be reloaded with Initial count. The count is reloaded in response to a channel index pulse. From the list, select one of the following:

  • A low B low

  • A low B high

  • A high B low

  • A high B high


You can apply a digital debouncing filter to the input pins prior to processing. From the list, select one of the following filter types:

  • None

  • Synchronize input to Timebase 3 (80 MHz)

  • Minimum pulse width 5 microsec

  • Minimum pulse width 1 microsec

  • Minimum pulse width 500 nanosec

  • Minimum pulse width 100 nanosec

  • Minimum pulse width 25 nanosec

Sample time

Enter the base sample time or a multiple of the base sample time (-1 means sample time is inherited).

PCI slot (-1:autosearch)

If only one board of this type is in the target computer, enter -1 to locate the board.

If two or more boards of this type are in the target computer, enter the bus number and the PCI slot number of the board associated with this driver block. Use the format [BusNumber,SlotNumber].

To determine the bus number and the PCI slot number, type:

tg = slrt;
getPCIInfo(tg, 'installed')

External Websites

Was this topic helpful?