LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calculating Time from Given input.

Hi everyone,
 
I'm stuck at trying to calculate the time of a given waveform.
 
Given a scenario, i have a circuit that is fed to a DAQ card for processing in LabVIEW. The input data generates a squarewave form in LabVIEW. I'm using a general waveform function to view the squarewave. The input is generated from a sensor.It will continously give a pulse when it detect something. But when it a doesnt anything, there'll be no output. so, no waveform is reflected at the waveform function in LabVIEW.
 
When that happens, I want to find the time when there's no output reflected at the waveform.
 
regards, aisyah.
0 Kudos
Message 1 of 2
(2,470 Views)
If you know the period of your waveform, you could write code that detects when the input is 0 for a period of time that is slightly longer than the period of your waveform.
 
1.  Note time that waveform goes to zero.
2.  If waveform goes to 1 reset your timer.
3.  Loop and watch your timer, if the time minus noted time is greater than the waveform period, then write out the noted time.
Message 2 of 2
(2,459 Views)