Rockwell Automation 1772-L8_LW_LWP_LX_LXP,D17726.5.8 User Manual User Manual

Page 246

Advertising
background image

EAF

Process Control Instructions

Chapter 16

16-35

3.

The first result word in the averaging EAF occurs in the second word
after the beginning of the result word address. The first 4 words of
the standard deviation result are reserved for internal
processor functions.

Averaging
The averaging instruction determines the arithmetic average of a group of
three digit BCD values. The maximum number of values you can average
is 999 or is limited by the data table area available.

The Averaging instruction uses the formula:

y

+

ȍ

i

+1

X

i

n

n

where

X

i

= three digit signed BCD values

y

= the average of the values

n

= the number of values

Entry and Display of Input and Result Values
Figure 16.12 shows one method you can use to enter values and display
results of the 3 digit averaging. Although there are several techniques for
accomplishing this, we chose Get instructions.

Be careful not to select data and result addresses so close together that
they overlap.

Advertising