Documentation

National Instruments PCI-6011E Pulse Width/Period Measurement (formerly PCI-MIO-16XE-50)

PCI-6011E Pulse Width/Period Measurement

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, select a counter, 0 or 1.

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

5000

Pulse width (high pulse)

Level triggered

Active high

15000

Period

Edge triggered

NA

20000

In every case, the output of the block is the number of clock ticks (of the 20 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.

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?