382 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
This information applies to the CompactLogix 5370, ControlLogix 5570,
Compact GuardLogix 5370, GuardLogix 5570, Compact GuardLogix 5380,
CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, and GuardLogix
5580 controllers.
The MAVE instruction calculates a time average value for the In signal. This
instruction optionally supports user-specified weights.
Available Languages
Ladder Diagram
This instruction is not available in ladder diagram logic.
Function Block
Structured Text
MAVE(MAVE_tag,storage,weight);
Operands
Function Block
Operand Type Format Description
MAVE tag MOVING_AVERAGE structure MAVE structure
storage REAL array Holds the moving average
samples. This array must be at
least as large as
NumberOfSamples.
weight REAL array (optional)
Used for weighted averages.
This array must be at least as
large as NumberOfSamples.
Element [0] is used for the
newest sample; element [n] is
used for the oldest sample.