Average - Allen-Bradley Micro800 General Instructions Manual

Programmable controllers
Hide thumbs Also See for Micro800:
Table of Contents

Advertisement

Chapter 13
Data manipulation instructions

AVERAGE

Parameter
RUN
XIN
N
XOUT
ENO
Tip: Using floating-point data types could result in inaccurate calculations due to the rounding limitations inherent in floating-point mathematics.
Tip: When setting or changing the value for N, you need to set RUN to FALSE, then set it back to TRUE.
298
AVERAGE stores a value at each cycle and calculates the average value of all
already stored values. Only the N last values are stored.
Average function block operation
The number of samples (N) cannot exceed 128.
If the RUN command is FALSE (reset mode), the output value is equal to
the input value.
When the maximum number of stored values is reached, the first stored
value is erased by the last one.
Arguments
Parameter type
Data type
Input
BOOL
Input
REAL
Input
DINT
Output
REAL
Output
BOOL
Rockwell Automation Publication 2080-RM001D-EN-E - February 2015
Description
TRUE = run/FALSE = reset.
Any real variable.
Application defined number of samples.
Running average of XIN value.
Enable out.
Applies only to LD programs.

Advertisement

Table of Contents
loading

Table of Contents