LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pulse width measurement with FieldPoint CTR-502

I would like to measure the pulse width of a signal (ranging from 10 ms to
400 ms out of a signal with period width of about 1 second). I would like to
use a fieldpoint counter module FP-CTR-502. I could find examples on how to
measure frequency but I did not know how to alter it in order to obtain the
pulse width.

Thanks,

Martien
0 Kudos
Message 1 of 2
(2,721 Views)
To measure pulse width of a fixed-period signal, you only need to use one counter, so the configuration and program would be different than the frequency measurement example. Set the count source for counter 0 to "32kHz Reference" and the gate source (and wire your signal) to "Gate Input 0." You'll also need to create a control channel to reset counter 0 (as described in the frequency example).

Your LabVIEW program should run as follows:
- When Gate Input 0 becomes true, do nothing
- When Gate Input 0 becomes false again, read then reset counter 0
- repeat

You can use FP Advise to wait for the gate to change (just like the frequency example).

Once you have the number of counts, you can divide that by the frequency (32 kHz) to calculate the "on tim
e" (pulse width) of your signal.

Regards,
Michael Shasteen
Applications Engineering
National Instruments
www.ni.com/ask
1-866-ASK-MY-NI
0 Kudos
Message 2 of 2
(2,721 Views)