LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in calculating time between peak to peak and valley current

Master, I want to calculating time between peak to peak and valley current (more details can be seen in the picture: How to calculate time in A area and B area and compare them?). I use Arduino and VISA. I've tried using "Peak Detection" & "Amplitude and level measurements" but it all does not work. Please help Master. Thank you in advance.

 

I attach my vi and graphic images output from my Arduino. Thank you.

 

 

Sincerely. 

rmfajar

Download All
0 Kudos
Message 1 of 11
(4,104 Views)

 don't know much the express vi you are using but it does not look like it can do what you want. You can definitely do what you want with the "Peak detector.vi" in the Signal processing\Sig operations sub-palette. Below is a rough example:

 

Example_VI_BD.png

Marc Dubois
Message 2 of 11
(4,060 Views)

Thank you for the answer. I've tried it, and its value is still not out. Is there something wrong with my vi? I attach my-my vi. Thank you. Smiley Happy

Download All
0 Kudos
Message 3 of 11
(4,041 Views)

You need to provide the full array of data (not point by point) to the peak detector vi. First, acquire your data, put them all in an array and then use the peak detector vi. Also, you need to adjust the threshold value to an amplitude that will differentiate the peaks (or the valley) from the rest of the signal. Based on the signal in the image you provided, a value of 2000 would work. You can also adjust the width value that is the minimum number of points that would constitue a peak or a valley. The threshold and the width help to prevent detection of false peak or valley.

Marc Dubois
Message 4 of 11
(4,024 Views)

Thank you for the answer Smiley Happy
I've made it into the array before entering to peak detector and change this treshold value, but the value still has not come out well. I do not know if I have the wrong sequence or not. I attached my vi results and again in the 2011 version. Thank you for your attention.

 

RR3.jpg

 

Sincerely,

Fajar

Download All
0 Kudos
Message 5 of 11
(4,004 Views)

When I say create an array, I mean you need to accumulate several data, put them in an array and then call the peak detector vi. You cannot calculate time between peaks and valleys using a single point. Below is an example.

 

coba4-2_BD.png

Marc Dubois
Message 6 of 11
(3,986 Views)

Thank you for the answer Smiley Happy

I have tried in my vi but the result is still the same no output.

 

RR4.jpg

0 Kudos
Message 7 of 11
(3,964 Views)

check with a probe the output of the array before the peak detector vi to make sure that there are data. Even better, output the array to an array indicator (right click on the wire and select Create \ Indicator). After running the VI, if there are the correct data in the array indicator, right click it and select "Data Operations \ Make Current value default" and save the vi. Post the VI. I will be able to see what's wrong. Make sure that the data are correctly saved though.

Marc Dubois
Message 8 of 11
(3,958 Views)

Thank you for your help Smiley Happy
I've done what you wrote. And I have been capturing the results. No values are out on probe and in the array. I have attached my vi.
Thank you.

 

RRProbe.jpg

 

Sincerely,

Fajar

Download All
0 Kudos
Message 9 of 11
(3,937 Views)

If you cannot output your data as an array, there is nothing I can do. Figure out a way to put your data as an array into the peak detector vi. Good luck

Marc Dubois
0 Kudos
Message 10 of 11
(3,922 Views)