Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to increase the resolution of duty cycle's measurement over PWM signal

Hi,
 
Using one of the analogue input ports, a PWM signal (with fixed time period of 10ms or frequency at 100Hz) was feed into my USB 6259 DAQ card. With the "Pulse Measurements" module in Labview 7.1, I managed to measure the period, pulse width and duty cycle of the PWM signal.

However, the resolution of the duty cycle reading was too low for my application, i.e. the duty cycle only shown in the step of 0.05, whilst I required the reading resolution for at least in the step of 0.01 or better.

After many attempts (searching the knowdlegde base and examples) I still couldn't find the way to do it. Any of your help is much appreciated if you could point me to the direction of solving this problem.
 
Many thanks,
Yap
0 Kudos
Message 1 of 2
(3,104 Views)
Hi Yap,
 
I'm just posting the code I sent you in case other users come across this forum thread.
 
From my research I couldn't find a way to improve the resolution of the duty cycle returned from the pulse width measurements VI. Suggested using a counter channel to measure the pulse period and the pulse width and use those values to calculate the duty cycle. This example only works for TTL compatible signals.
 
Attached is some example code in LabVIEW version 7.1 to do this.
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 2 of 2
(3,056 Views)