Control Structure - Allen-Bradley Logix5000 Reference Manual

1756 controllogix, 1768 compactlogix, 1769 compactlogix, 1789 softlogix, 1794 flexlogix, powerflex 700s with drivelogix
Hide thumbs Also See for Logix5000:
Table of Contents

Advertisement

Mnemonic
Data Type
.EN
BOOL
.DN
BOOL
.ER
BOOL
.LEN
DINT
.POS
DINT
Description:
Arithmetic Status Flags:
Fault Conditions:
Array (File)/Misc. Instructions (FAL, FSC, COP, CPS, FLL, AVE, SRT, STD, SIZE)

CONTROL Structure

Description
The enable bit indicates that the AVE instruction is enabled.
The done bit is set when the instruction has operated on the last element in the array (.POS = .LEN).
The error bit is set if the instruction generates an overflow. The instruction stops executing until the
program clears the .ER bit. The position of the element that caused the overflow is stored in the .POS
value.
The length specifies the number of elements in the array on which the instruction operates.
The position contains the position of the current element that the instruction is accessing.
The AVE instruction calculates the average of a set of values.
IMPORTANT
Arithmetic status flags are affected.
A Major Fault Will Occur If
.POS < 0 or .LEN < 0
Dimension to vary does not exist for the
specified array
Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Make sure the Length does not cause the instruction to exceed
the specified Dimension to vary. If this happens, the Destination
will be incorrect.
Fault Type
4
4
Chapter 8
Fault Code
21
20
381

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents