How Can I Create a Rolling Average in Lookout?Primary Software: LookoutPrimary Software Version: 5.1 Primary Software Fixed Version: N/A Secondary Software:
Problem: I can see that using the Average object in Lookout will generate a running average over time. I need to have a rolling average that will calculate the n most recent samples of a signal, where n is a number. How can I create this continuous rolling average? Solution: The Average object in Lookout actively calculates the average value of data over time, which gives you a running average. In order to easily create a rolling average, which continuously takes a set number of samples and calculates the average, you need to use the XBaR or XChart objects. The XBaR object graphically displays an X-Bar chart and/or an R chart for a given signal. Similarly, the XChart object graphically plots the value of an observed signal on a chart in response to a trigger signal. With either object, the most important parameter for creating a rolling average is the Number of samples to display. When samples are taken with these objects, they are averaged and displayed up until the Number of samples to display is reached, at which time the object removes the oldest sample before plotting the newest sample and generating a new average. The datamember of interest for the rolling average value is the R_CL or CL datamember for these two objects. In short, to create a rolling average:
For more information about these objects, refer to the Lookout Help. Related Links: Attachments:
Report Date: 08/28/2003 Last Updated: 11/06/2003 Document ID: 30REDQ2P |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
