LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with extracting average signal around analog square wave trigger

I have an application that captures 3 analog channels: Channel 0, Channel 1, and an Analog Trigger.  All 3 of these are displayed on a waveform chart which is later exported to file.

I am having trouble creating a VI that:
    1. Detects the rising/falling edge of each square wave "analog trigger"
    2. Detects the length of each squre wave "analog trigger"
    3. Takes the average Channel 0 and Channel 1 values over the duration of the analog square wave trigger
    4. Maintains a count of the analog triggers detected

I have attempted to use the "Waveform Peak Detection" vi to do this, but it does not appear to be working how I desire.  On first run, it gives me 8 results, when I use a width value of 7.  This is due to the short fall time between the 3rd and 4th trigger.  Any other values are not even close to the actual number of triggers "9".

An acceptable data trigger to me is one that has 10 points in a row above 3.3V and is no longer than 300 to 400 data points.

Any advice would be appreciated!

Thanks


CLA, CTA
0 Kudos
Message 1 of 2
(2,632 Views)
Update:

I just created an XY graph to display the peak detection data points and realized that the peak detector works well with a width of 3 and threshold of 4.5.  The results are detection of the rising/falling edge which will be great for to extract sub-arrays and average...
CLA, CTA
0 Kudos
Message 2 of 2
(2,629 Views)