LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Post-triggering?

Hello,
My application is somewhat simple, but I'd like any input/advice anyone has...

Essentially, what I want to do is take an input signal, keep a running average of that signal ("flatten" it if you will), and keep track of any signal that is above that average (to within a certain tolerance). Then, I want to start recording data from a few seconds before that event happens and a few seconds after that event happens. How might I tell LabVIEW to look at the time before this event?
Thanks,
Joe
0 Kudos
Message 1 of 3
(2,059 Views)
Good Afternoon,
When you are aquiring the data you keep a bit of it in a buffer that is a little longer than the period you are interested in (an array that as you update by adding to the end you drop the first element off the beginning). Then when you get your trigger event you just start evaluating the data that is in the buffer. Each element of the array represents a slice of time, based on you DAQ sampling rate, so you can go back however much you like (within the limits of your buffer size).

If this isn't entirely clear I blaim it on "late Friday afternoon"

Putnam Monroe
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 3
(2,053 Views)
You will need to keep some data in a buffer. The number of samples that you want to have from before the trigger will need to be stored in some sort of circular buffer. Then when you get a trigger event, you will have the datapoints from before it (pre-triggered data). You take this and the number of points you want from after the trigger and output it.

If you don't store the points, they're gone.

Hope that this helps,
Bob
0 Kudos
Message 3 of 3
(2,052 Views)