LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What am I doing wrong when trying to calculate peak to peak of my wave form that I am reading?


@crash_override wrote:

 Is there a way to populate an array with 10 values divide by 10 and use that value and then clear the array for the next 10 samples?


You are way overthinking that. Why would you need to clear the array if you overwrite each element later anyway?

 

For a good introduction and alternatives, have a look at our old NI Week talk. I am discussion exactly this problem in part II on slides 12-14 and show alternatives and how they compare. So watch the video, download part II, look at the slides, and inspect the example. Good luck!

0 Kudos
Message 11 of 21
(1,398 Views)

Is there a way to compute peak to peak voltage in labview built in? If not, how can I read the waveform and do it manually?

 

 

0 Kudos
Message 12 of 21
(1,391 Views)

This is something you need to measure, not compute. Please keep it all in one place. Thanks!

0 Kudos
Message 13 of 21
(1,384 Views)

Thank you. Is the Amplitude level and Measurements function inaccurate? Seems to give me terribly inaccurate measurements and the Tone Measurements is even worse.

0 Kudos
Message 14 of 21
(1,373 Views)

You have never shown us how the original signal looks like. Maybe your parameters are way off?

As a rule of thumb, the quality of the result of an analysis cannot be better than the quality of the data.

0 Kudos
Message 15 of 21
(1,360 Views)

 

IMG_20200630_113132068.jpg

 

I hope this might help. This is what my extech meter reads and I trust that it's somewhat accurate however, my scope reads quite distant results in terms of the way the waveform looks and the peak to peak value I get using Amplitude and Levels Measurements express vi. Is there anything else I can provide that would help? I'm sending the amp a 100khz signal with an amplitude of 2v.

 

 

IMG_20200630_114128187.jpg

I'm sorry my phone camera just broke this is the best I can do for right now. My acquisition time is set to .02 which should be equal to 2ms just like the extech.I have set my sample rate to 200k which is double the frequency I'm inputting because otherwise it says I'm sending it 50 khz not 100. Trigger slope is rising just like the extech scope. 

0 Kudos
Message 16 of 21
(1,335 Views)

These images are useless. Please run your program until data shows on the "analog data" graph. Stop the VI. Right-click the graph...data operations...make current value default. Save VI under a new name and attach it here.

0 Kudos
Message 17 of 21
(1,331 Views)

Twice the frequency is the bare minimum you should have set it to.

 

Make your acquisition rate more like 5 or 10 times the 100 kHz rate.

 

Twice the frequency means you only get 2 points for each cycle of your signal!

 

0 Kudos
Message 18 of 21
(1,328 Views)

Ok! I changed the sample rate to 100k. Seemed to increase the ptp by a lot. Here is the vi with the saved graph data.

 

0 Kudos
Message 19 of 21
(1,324 Views)

So you have a 100kHz signal sampled at five points per period and it looks like there are higher harmonics. Are you sure the real peak is not between the sampled points? Your p-p is based on 200 peaks. Tell me again why you think you need to do a ptbypt average? This looks nothing like you see on the oscilloscope.

 

What are you trying to get out of it?

 

altenbach_1-1593534008568.png

 

 

0 Kudos
Message 20 of 21
(1,318 Views)