From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

peak detection during the acquisition

Solved!
Go to solution

I acquire from daqmx a signal (single channel dbl array or waveform) continously.

 

The signal is a triangle waveform.

 

I need take time between peak and valley for each peak.

 

I try with peak detection but not work, the signal acquired are not period windowed.

 

Also i need to save for each row the results of the evaluation (time peak /valley, Peak and valley amplitude)

 

Anyone can help me?

 

thanks

 

 

Nicola
LabVIEW DeveloperByteLABS.
0 Kudos
Message 1 of 6
(4,224 Views)

For real-time peak detection, try Peak Detector PyByPt

0 Kudos
Message 2 of 6
(4,217 Views)

Generally for interacting with the forums, the best system would be to narrow your problem to a single VI, give us some sample data and what you are expecting as an outcome. As it stands with the state of your program it is very difficult to figure out what exactly it is that you want, what it is supposed to produce as an output and where the problem could be coming from.

 

For your stated problems however (I am guessing what the problem is as your description is very vague):

I would say that your first problem is that you are simply looking at the array max and min rather then the peaks/valleys of the array. This will mean that for every instance you will only ever get 1 peak and 1 valley? Is this what you were trying to do?

 

With regards to the logging where would this be located inside your program?

 

You do realise that when the Event case in the top loop is entered, the only way to continue from that loop is to try and close the window then press continue?

0 Kudos
Message 3 of 6
(4,213 Views)

You're right for all,

 The design are not completed i know the event is only exit when the user close windows but that is a requirement.

 

i attach only  the simple acquire(i acquire continuously), because my need is to keep (the picture explain better) for each period cycle (cycle are two valley, in the picture signed by T1,T2 ....) the time ta(valley to peak) and the time tf(peak to next valley) and the peak to valley amplitude (Vmax-Vmin).

I need to keep this for each cycle period because the results shall be calculate the mean values.

 

In effect my issue is take each period cycle, after i know is simple to have min max and times between.

 

For this i try the Peak detection but i have more than the needed values and i don't know how cut the single period cycle waveform to take my needed data.

 

Finite acquisition are not possible because i need to show the contiuous waveform on the chart.

 

Thanks a lot for your help.

Nicola
LabVIEW DeveloperByteLABS.
Download All
0 Kudos
Message 4 of 6
(4,172 Views)
Solution
Accepted by topic author ByteLABS

That is a start, now if you feed the Data output from that into a "Waveform Peak Detection VI". You will have to play around with the threshold and width inputs for this VI to determine how the detection works. You can also change the input around to select whether you are detecting peak or valleys.

 

One thing to remember is that the threshold value is the minimum value of a peak or a maximum value of a valley.

 

You will need to also either some sort of timing for the loop (a 100ms wait) or set the timeout/samples per channelvalues if you want to get more then 10-20 samples per waveform.

0 Kudos
Message 5 of 6
(4,152 Views)

Thanks,

 

Now it work, in effect the width are the key to edit.

 

Thanks to all for the support.

 

Nicola

Nicola
LabVIEW DeveloperByteLABS.
0 Kudos
Message 6 of 6
(4,093 Views)