Measurement Computing PCI-CTR05 PWM Capture

PCI-CTR05 PWM Capture block (not recommended)


Simulink® Real-Time™ Library of Drivers No Longer Recommended for Use


This block programs the AMD9513A for capturing PWM signals by using two counters. One counter measures the cycle duration, and the other counter measures the duration the signal is high.

There are two outputs. One output is the relative frequency compared to the base frequency. The other output is the duty cycle. To get the actual frequency, multiply the base frequency by the relative frequency.

The PWM signal has to enter the pins named GATE of both corresponding counter channels (parallel wiring). Both CLK pins have to be left unconnected.

Scaling Input to Output

I/O Module Output

Block Input Data Type




0 to 1

Block Parameters


From the list, choose 1&2, 2&3, 3&4, 4&5. This selects which two counters the driver block uses to determine the PWM. One block is required for each counter used.

Frequency base

From the list, choose F1=5MHz, F2=500kHz, F3=50kHz, F4=5kHz, or F5=500Hz to set the base frequency.

Sample time

Enter the base sample time or a multiple of the base sample time. The sample time indicates the update rate of registration on the input (Duty Cycle)

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')

Was this topic helpful?