Some courses and learning paths on NI Learning Center may not appear on learner dashboards. Our team is actively investigating.

If you encounter access issues, please contact services@ni.com and include the learner’s name, email, service ID or EA number, and the list of required courses.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Average

Average,

Is there, or is it possible to make subVI with
- One input
- One output
- The output gives the average / mean value of the last n (constant or
variable) value's on the input.
- It's no problem that the first n output values are incorrect.
- It's a problem when the input is a subVI in the loop or program.

Thanks Paul
0 Kudos
Message 1 of 3
(3,234 Views)
Paul;

Unless "n" is a constant value or depend on the number of elements on the input array, you need an extra input to tell your subvi where to split the array.

You can explit an array using the "Split 1D Array" vi, located in the Array menu in the functions palette.

You can use the "Mean" vi located in:

Mathematics -> Probability and Statistics

With this, certainly you can do what you want.

Regards;
Enrique
www.vartortech.com
0 Kudos
Message 2 of 3
(3,234 Views)
"You can explit an array..."

Sorry, I mean split...
www.vartortech.com
0 Kudos
Message 3 of 3
(3,234 Views)