beautypg.com

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

Page 35

background image

Programming

Chapter 3

3Ć27

Figure 3.23

AF1 Average Function Format After Address Entry

17 16 15 14 13 12 11 10 7 6 5 4 3 2 1 0

S

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

11586

Digit 6

ER

ER = Error Bit (Set if number of readings = 0)

S

Digit 1

(MSD)

Digit 1

(LSD)

Input 2

Input 3

Number of Inputs

0

0

3

200

201

202

203

305

306

4. Enter the values of the numbers you wish to average in the input word

addresses. You can enter these numbers from the keyboard of your
industrial terminal or through ladder diagram functions. if we choose to
enter values of +413, +235, and +121 into input word addresses 201, 202,
and 203 respectively, we obtain the result shown in Figure 3.24 when the
average function executes. The result appears in result words 305 and 306
as 256.333.