Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate duty cycle with PXI-4070 in LabWindows/CVI

Hi,

Is there a easy way to calculate the duty cycle with 4070 in LabWindows/CVI? The only way I can think of is to capture the waveform and calculate the duty cycle by myself. Is there a build-in function to do this?

Thanks,
Joe
0 Kudos
Message 1 of 2
(3,010 Views)
Hello cimtek1. 
Thank you for contacting National Instruments.
 
You are correct in stating that the best way to find the duty cycle with a 4070 is to do a waveform acquisition and then some independent coding to calculate the duty cycle.  There are some great examples of acquiring a waveform in our CVI DMM examples which are located at C:\Program Files\National Instruments\CVI80\samples\niDMM\Waveform Acquisition upon the installation of our DMM driver.  This assumes of course that the drive where the driver was installed on is the C drive.
 
This should help you easily acquire a waveform from the 4070.  After this, all of the data acquired will reside in an array containing the timestamp representing when the sample was acquired as well as a corresponding value for the timestamp.  If you parse through this array and find the times at which rising and falling edges happen (quick changes from 0V to 5V or 5V to 0V under TTL logic), it should be fairly simple to then calculate the duty cycle.
 
I hope this helps your efforts.  If you have any further questions, we will be happy to assist you!
 
Brian F
Applications Engineer
National Instruments
 

 

0 Kudos
Message 2 of 2
(2,993 Views)