
Programming
Chapter 3
325
AF1 A
verage Function
The AF1 average function determines the average of a group of N three digit
integers. The numbers are in BCD format.
x
1
x
1
x
1
.)x
2
x
2
x
2
x
2
.)x
3
x
2
x
2
.)AAAx
N
x
N
x
N
x
N
.
N
+xxx.xxx
The result is a 6 digit number composed of a 3-digit integer and a 3-digit
decimal fraction. The maximum number of values you can average is 999 or is
limited by the data table area available.
How to Enter an AF1 Average Function
To program an AF1 average function, perform the following steps:
1. Press [SHIFT] [EAF] or [SHIFT] [SCT] on the keyboard of your
industrial terminal. Figure 3.1 appears on the CRT.
2. Enter 06, the function number for the AF1 average function.
This entry identifies that the function entered is to perform an AF1 average and
that the processor use the data table format shown in Figure 3.22 when
executed. The three digits showing the number of inputs and the three digits of
each input value are represented in BCD by groups of bits labeled digit 1
through 3. The 6-digits of the results are labeled digit 1 through 6.