Programming chapter 3 – Rockwell Automation 1772-AF1,D17726.5.1 User Manual MINI-PLC-2/15 User Manual
Page 34

Programming
Chapter 3
3Ć26
Figure 3.22
General AF1 Average Function Word and Digit Format
17 16 15 14 13 12 11 10 7 6 5 4 3 2 1 0
S
Digit 1
(MSD)
Digit 2
Digit 3
Bit No.
Data Address
Digit 2
Digit 3
(LSD)
Input 1
S
Digit 2 Digit 3
Digit 2 Digit 3
Digit 1
S
Digit 1
(MSD)
Digit 2 Digit 3
Result Address
Digit 5
Digit 4
Result
D
E
E = Enable Bit (1 = Function in Progress)
S = Sign Bit (1= Negative)
D = Done Bit (1 = Function Complete)
MSD = Most Significant Digit
LSD = Least Significant Digit
11585
Digit 6
ER
ER = Error Bit (Set if number of readings = 0)
S
Digit 2
Digit 3
(LSD)
S
(LSD)
Digit 1
(MSD)
Digit 1
Digit 1
(MSD)
(LSD)
Input 2
Input 3
Input N
m
m + 1
m + 2
m + 3
m + N
n
n + 1
N = Number of Readings Being Averaged
Number of Inputs
3. Enter a data address and store in that address the number of values to
average. Then enter an address for the result.
Let’s choose a data address of 200 and the number of values to average of 003.
Also, let’s choose 305 as the address for the result. Entering these values results
in the data table format shown in Figure 3.23. Once you enter the data address,
the addresses of the remaining input words are selected automatically by the
AF1.