LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform peak detector - how to store all the peak locations

Dea all,

 

I used waveform peak detector. I need to store the peak location and peak amplitude in two columns. and all the peaks location will appear in the column with real time stamps. How to solve this? Thanks

columns.jpg

0 Kudos
Message 1 of 16
(3,191 Views)

I don't know if I understand you well, but I think, that all you need to do is read help for this function

 

http://zone.ni.com/reference/en-XX/help/371361H-01/lvwave/waveform_peak_detection/

 

0 Kudos
Message 2 of 16
(3,170 Views)

Hi Adam Trojak,

 

Thanks for replying me. I am sorry I am quite new to labview so I may need more guide on this. Actually the waveform peak detector works well in my application. But the result is a bit diffrent from the one I want. I used DAQ to get my signal which the sample to rate is 3K, rate is 1K. So that when I read my signal and pass the function, the location results is not real time, they displayed within 3 second. View the picture I attached, in 3 second, there are 4 peaks, displaying the locations as 39.3281, 862.318, 1670.41, 2457.16. I need the next peaks after the 4 peaks should be at around 3200, but it displays in 3 second again. I hope you understand my problem. 1.jpg

0 Kudos
Message 3 of 16
(3,145 Views)

You need to post your VI.  Are you saying you are analyzing the same data again?  Or that the next snapshot of data is starting over at zero and you don't want it to?

0 Kudos
Message 4 of 16
(3,139 Views)

Hi RavensFan,

 

For example I used the same data continuously, I expect the next peaks display to be at 3039.3281, 3862.318,4670.41 and 5457.16. But the actual results are still at 39.3281, 862.318, 1670.41, 2457.16. I wonder to know if it is related to my data of sampling? How to solve this? Thank you.

0 Kudos
Message 5 of 16
(3,131 Views)

You need to post your VI.

 

I don't know how you are sampling to be able to answer that question.

0 Kudos
Message 6 of 16
(3,128 Views)

Please help me to take a look. Thanks

0 Kudos
Message 7 of 16
(3,120 Views)

You're losing your timing information you have in teh waveform datatype when you convert it from a waveform to a double array through that Express VI.  Then you make your X values the hard coded 0 to 2999 by way of that For Loop which are the same values every iteration.

 

What you need to do is use the ramp function instead of that For Loop.  Then you can store your final ramp value in a shift register, and use that as the start point for the next iteration of the while loop.

 

I'm not sure all what you are doing here.  You are reading the same file over and over in a loop.  Is that file ever changing?  If not, why do you even have a while loop?

 

Since youre ECG Peak Threshold is never used as a control, you should turn that into an indicator and use that terminal instead of the local variable.

0 Kudos
Message 8 of 16
(3,115 Views)

Hi RavensFan,

 

I am really new for labview and I found out labview is hard to check where you go wrong coz you can not see the values in the parameters even you can set breakpoint. I appreciate if you could help me to do some modification on my current VI. I attach the data for you to try out. I have a 4 to 5 mins signal.

0 Kudos
Message 9 of 16
(3,105 Views)

HIghlight execution slows down the execution of the code and lets you see all the values going down the wires.

 

Putting probes on wires will show you the values in the wire and when it last executed.

 

Putting extra indicators into your block diagram can show you on the front panel the values in wires you wouldn't normally have looked at.

0 Kudos
Message 10 of 16
(3,086 Views)