LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does software triggering of a waveform really work?

Hallo,
I have a problem with triggering my waveform. I use the "Simple Trigger
Detection.vi" from the Functions>Analysis>WaveformControl-menu. This
seems to me as been build to find a trigger event in waveform data,
namely in an array. Unfortunately it always triggers at the first
element of the array, even though this is below the trigger level and
the next is even lower.
Scanning the help and documentation I found as well the base VIs for 1
and more channel detection but non of those includes a proper
documentation, what the VI really does 😞
It calls a DLL-function named triggerh, but for this I couldn't find any
documentation either.

I'm especially interested, if the VI remembers if it has detected a
rising
edge and in the next run continuous by looking for a falling edge
first before detecting the next rising edge. As well I would like to
know why the earlier described error occurs.

I'd be very thankful for some help with this VIs or recommendations for
other VIs to use. Otherwise I would need to program the whole stuff on
my own, which would be not as fast, I suppose.

Thanks in advance

Jan
0 Kudos
Message 1 of 6
(3,709 Views)
Jan,

I have attached a simple example that uses "Basic Level Trigger Detection.vi" found in the Analyze->Waveform Monitoring menu. You can change the slope from rising to falling edge to note the change in the result.

I was unable to find the "Simple Trigger Detection.vi" that is giving you trouble. If you would like you can attach a piece of code that replicates your problem. Please make sure to include all subvi's in the attachment (including the Simple Trigger Detection.vi). I can take a look to see what is going on.

Thanks.

Matt Kisler
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 6
(3,706 Views)
Hi Jan,

I have exactly the same problem:
my signal has several peaks and find only the first on.
Could NI help?

Regards
skyh
0 Kudos
Message 3 of 6
(3,651 Views)
Skyh,

If you have the Full or Professional versions of LabVIEW, then there are two VIs already bundled with LabVIEW for the purpose of finding all of the peak/valleys in a signal. The name of the VIs are Peak Detector.vi and Waveform Peak Detection.vi and they are located in the All Functions»Analyze»Singal Processing»Time Domain and All Functions»Analyze»Waveform Monitoring palettes. You can learn more about the details of how they works by pressing Ctrl+H and hovering your cursor over them on the block diagram.

Regards,
E. Sulzer
Applications Engineer
National Instruments
0 Kudos
Message 4 of 6
(3,632 Views)
Hi Jan,

If the VI always returns the zero array index, could it be that it hasn't actually detected any trigger condition - check for this using the "trigger detected?" boolean output (and watch the error output).

If you use this VI in its continuous mode then, by definition, a second rising edge trigger cannot occur until the signal falls back below the threshold level (threshold-hysterisis if hysterisis is used). It does not have to "remember" as such, a post rising edge triggered signal has to fall below the threshold before it can rise through it again.

N.B. If you use this VI in a "single shot" mode, then you really need to wire the "reset" input with a "true" constant (its default is "false"), otherwise a second call of the VI assumes that the new array is a continuation of the last call's array.

I hope this helps. I've tested and used this VI without any problems - let us know how you get on.

Mark H.
0 Kudos
Message 5 of 6
(3,622 Views)
Cripes - I just noticed the original message was from 2001. The guy has probably figured it out by now! 😉

Oh well, maybe we've helped Skyh.
0 Kudos
Message 6 of 6
(3,617 Views)