LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Average of the last 3 values

Solved!
Go to solution

Hello everyone!
I have a chart with different temperature values (randomly generated by a subVI). The chart changes color depending on an upper or lower limit. The next thing I want to do is an average of the last 3 values. How can I do this?
I think I have to use PybyPy Mean block but I don't know exactly how. 

 

Thanks!

 

 

0 Kudos
Message 1 of 4
(1,401 Views)

@Cr!s wrote:


I think I have to use PybyPy Mean block but I don't know exactly how. 

 


Did you read the help? Just wire the current temperature, set the sample length to 3, and you'll get out the average of the last three values.

 

The detailed implementation depends on your chart datatype, etc.

 

(Note that the plot color is global to all points. You would require a bit more code to have one of three colors for each data point)

 

Also note that our help will be more specific and more helpful if you attach your VI instead of a picture.

0 Kudos
Message 2 of 4
(1,378 Views)
Solution
Accepted by topic author Cr!s

See if this can give you some ideas....

0 Kudos
Message 3 of 4
(1,366 Views)

I figured it out. Thanks!

0 Kudos
Message 4 of 4
(1,311 Views)