LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how I can calculte the time between two edges of square wave

I am using PCI-6052 Ni data acquisition card. I want to calculate the duty cycles of 6 analog square waves of 25Hz at 6 different channels of ni daq card simultaneously in real time acquisition. The input signals are of different duty cycles. I have the time period of these sqaure waves and after calculating the T-on time, I will be able to calculate duty cycles in this way. Please help me calculating the T-on time through timing function.
0 Kudos
Message 1 of 2
(2,174 Views)
Sagib

I am not sure what you are refering to when you say 'T-on time.' I am not aware of that term. Could you please explain.

If the signal is just a normal DC pulse, you can read in the signal continuously, then analyze the data. You can determine how many clock pulses the signal was at a high voltage and the same for the lower voltage. Then, divide the number of clock pulses the signal was high by the sampling frequency to determine the time the signal was high. Do the same thing for the low voltage. From these calculations, you can determine the dute cycle.

If I am miss understanding your application, please let me know.

Brian
0 Kudos
Message 2 of 2
(2,174 Views)