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.
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.
08-29-2014 04:56 AM
Hi
I have a sine wave that has an average peak to peak value of 1.2V. The sine wave has a dc offset of around 2.5V. Each cycle in the sine wave varies in width.
I can feed the signal into the express vi to tell me the maximum Positive pulse peak value and minimum negative peak value.
Unfortunatly i would like to measure the Maximum and Minimum Positive Pulse Peak value and Maximum and Minimum negative peak values.
Im a little bit lost on how to do this.
the frequency of the signal is around 10-20 hz.
If i could get the Postivie peak value for every cycle and negative peak value of every cycles stored in two seperate 1d Array i could then search the 1d array for maximum and minimum. Problem is i am unsure how to find each indiviaul peak value.
i have attached my code. I am using at 9229 to monitor the signal. I am sampling at 10000 samples per second and recording about 2 seconds of data.
Thanks
08-29-2014 03:52 PM
any ideas anyone
08-29-2014 04:57 PM
I think the Peak Detector VI will do most of what you want. In the attached VI I simulated your signal with the sum of a sine and a ramp to create a series of waves with peaks and valleys at different amplitudes. For this simple example I used the offset as the threshold. Depedning on the behavior of your signal, you may need to use a more sophisticated method to find a suitable threshold, possibly using different thresholds for different segments of the signal.
Lynn
09-01-2014 02:41 AM
I tried using the you put into the VI and unfortunatly it doesnt work. Im using a 20hz sine wave. I have set my threshold to be the dc offset of the signal so around 2.5V but this changes by around 20mv each time.
I have uses an Max and Min array function. It chucks out the highes Peak amplitude but the lowest peak amplitude is incorrect. It counts that there is over 2000 pulses, but that is impossible as there is only 20 high pulses.
Any more ideas or help would be great.
09-01-2014 05:08 AM
Hi JWinstanley,
Have you tried using the peak detect function on LabVIEW?
Here is a link explaining a few of the functions.
http://www.ni.com/white-paper/3770/en/
I hope this helps,
09-01-2014 05:40 AM
Ive been able to sort it. with the help of a guy at my work i figured out how many bits of data per cycle. Used two for loops to then look at min and maximum values per 986 bits of data. this then gave me maximum and minium pulse amplitude per cycle. this then got put into a 1d array.
Thanks for your help