LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make labview program to get average value of 200 reading from multimeter (by using loop)

Hi BA,

I have a question about the way how to set history length...  (I am evaluating the 2016 version).. right click on the Hystory doesn't show anything like "history length". I need only last 5-10 samples for my application.

The code itself  (image attached, as per yours) apparently works, but the outout is not smooth (I am monitoring it numerically and on another Waveform Chart).

 

BTW, how to disable the automatic Y-scale of the Waveform Chart?  it is annoying..

Thanks in advance!

0 Kudos
Message 21 of 26
(2,846 Views)

Sorry for this, I've found all the answers, I needed to experiment a bit more.

Thank you!

0 Kudos
Message 22 of 26
(2,843 Views)

Hey tbob, this example you show is perfect for what I am trying to accomplish.  I've managed to set everything up in my VI to match what you have, but the shift registers part is hard to recreate without some more guidance.  My shift registers are black and don't allow me to connect to any array elements.  I am new to Labview and this is my first program.  Could I maybe see a VI example of this?

0 Kudos
Message 23 of 26
(2,531 Views)

Sorry, new to this.  I was referring to message 13.  I clicked reply there...guess it just adds comments at the end of the thread.  Oops!

 

 


@M.A.P. wrote:

Hey tbob, this example you show is perfect for what I am trying to accomplish.  I've managed to set everything up in my VI to match what you have, but the shift registers part is hard to recreate without some more guidance.  My shift registers are black and don't allow me to connect to any array elements.  I am new to Labview and this is my first program.  Could I maybe see a VI example of this?


 

0 Kudos
Message 24 of 26
(2,520 Views)

You need to wire a data source to the shift regsiter. (either initialize on the left or wire to the right from the inside and the datatype will be defined). If you still have problems, show us your code.

 

Also note that bob's image is a "LabVIEW snippet", so all you need is drag the image to the block diagram and it will turn into real code. 😄

 

Still, all you need is "mean ptbypt" to average the last N points, don't over-complicate things. It would also help to keep the array at a constant size in Bob's code.

 

(Other types of running averages are discussed in our NI-Week talk.)

Message 25 of 26
(2,511 Views)

Thank you altenbach!  I didn't know that about snippets.  What a fun feature.  I was able to use the Mean ptbypt VI and yes, it was much simpler and cleaner for what I needed.  Thanks so much!

0 Kudos
Message 26 of 26
(2,490 Views)