Documentation

National Instruments PCI/PXI-6602 Pulse Width/Period Measurement

PCI/PXI-6602 Pulse Width/Period Measurement block

Library

Simulink® Real-Time™ Library for National Instruments®

Note

Connect the signal you want to measure to the GATE input of the chosen counter. The signal must have fast rise and fall times; otherwise, the counter might experience false triggering. Use signal voltage levels between 0 and 5 volts (TTL levels).

Block Parameters

Counter

From the list, choose one of the following:

  • 1

  • 2

  • 3

  • 4

  • 5

  • 6

  • 7

  • 8

These parameters specify the counter(s) to be used with this driver block. In each case, one block is required for each port.

Trigger mode

From the list, choose Level Triggered or Edge Triggered. See the table below for an example of how Trigger mode and Polarity interact. In this table, the data in the Output column resulted from a 1 kHz pulse train with a 25% low and a 75% high pulse.

Polarity

From the list, choose Active low or Active high. See the table below for an example of how Trigger mode and Polarity interact. In this table, the data in the Output column resulted from a 1 kHz pulse train with a 25% low and a 75% high pulse.

Measurement Objective

Trigger Mode

Polarity

Output

Pulse width (low pulse)

Level triggered

Active low

20000

Pulse width (high pulse)

Level triggered

Active high

60000

Period

Edge triggered

NA

80000

In every case, the output of the block is the number of clock ticks (of the 80 MHz source clock) required for the specified measurement. When measuring pulse width, the output reflects the number of clock ticks for which the input signal was in the specified (low or high) state. See the table above for an example.

Filter

From the list, choose one of the following:

  • 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

This parameter specifies the level of digital filtering you want to apply to the pin. See the National Instruments PCI/PXI®-6602 user manual documentation for details.

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?