05-05-2014 05:11 AM
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
05-05-2014 12:07 PM
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:
05-06-2014 01:53 AM
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.
05-06-2014 02:04 PM
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.
05-07-2014 03:23 AM
Thank you for the answer
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.
Sincerely,
Fajar
05-07-2014 07:16 AM
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.
05-08-2014 03:23 AM
Thank you for the answer
I have tried in my vi but the result is still the same no output.
05-08-2014 06:37 AM
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.
05-10-2014 07:34 AM
Thank you for your help
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.
Sincerely,
Fajar
05-10-2014 11:15 AM
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