LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I trigger when a waveform is above a threshold value but still trigger if it slips below threshold for a short time then comes back up?

Hi,

I am relatively new to LV, but am slowly learning how this all works. I am trying to create a system that
-Reads in a signal from the Analog channel of a DAQ card (seems to work)
-Filter the signal to isolate the fundemental frequency within a specified range (also seems to work)
-Trigger an output when the filtered signal is above a threshold voltage for a given amoun of time, and then stay on until it drops below threshold for a given amount of time. (This I have not done succesfully, and need help!) Both time thresholds (on and off) and thereshold (can be two different thresholds or just one) parameters
are adjustable on the interface.

I will gladly attach the VI I've been working on, but after searching around the site I feel like there might be a much easier way to do all of this, so I'd be interested to see how simply all this could be done.

For reference, I am using a PMD-1208LS USB DAQ with a Dell Latitude w/ 256 MB RAM.

Thanks so much!
Sincerely,
Brendan Florez
Download All
0 Kudos
Message 1 of 3
(2,786 Views)
This is a minimum frequency detector, where the frequency is not that of the signal itself but rather how often the threshold is crossed. In hardware this is usually accomplished with a one-shot multivibrator. In software you can do the same thing with a slightly different approach. Assuming that your data is in a array sampled at a uniform rate, then each sample occurs at a known time, delta T, after the previous sample. Delta T = 1/sampling frequency. So when the threshold is crossed note the array index i. If the threshold is crossed again before k samples (index i+k), then stay on. The time duration is k*delta T, so you can change the delay by varying k.

Lynn
0 Kudos
Message 2 of 3
(2,786 Views)
I would strongly suggest looking into buying a NI board. Unfortunately, I am not very familiar with the PMD board, but I do know that programming your functionality into LabVIEW with an NI board is actually quite easy. Take a look at this link that describes analog triggering with windowing:

http://zone.ni.com/devzone/conceptd.nsf/webmain/2AF60E522378449286256815005806D3?opendocument
0 Kudos
Message 3 of 3
(2,786 Views)