Programming chapter 3 – Rockwell Automation 1772-AF4,D17726.5.3 User Manual, AUX FUNCT PROM User Manual

Page 33

Advertising
background image

Programming

Chapter 3

3Ć25

4. Enter values for operands 1 and 2.

You can enter these numbers from the keyboard of your industrial terminal or
through ladder diagram functions. Entry of operand 1 = 000400 and operand 2
- 000200 produces the result 000002.000000 (Figure 3.16).

Figure 3.16

AF4 Division Function Format After Execution

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

S

0

0

Bit No.

Data Address

Operand 1

Operand 2

S

Result Address

Result

D

E

E = Enable Bit (1 = Function in Progress)

S = Sign Bit (1= Negative)

D = Done Bit (1 = Function Complete)

11492

201

202

203

204

305

306

307

310

0

0

0

4

0

0

0

0

0

2

0

0

0

0

2

0

0

0

0

0

0

0

(0)

S

(0)

(0) (0) (1)

ER

(0)

ER = Illegal Operand (Divide by Zero)

Entry and Display of Input and Result Values

Figure 3.17 shows one method you can use to enter values for operands 1 and 2
and for displaying the results of an AF4 division. Although there are several
techniques for accomplishing this, we chose get instructions. The first rung
requests an AF4 division function. The top branch of the second rung shows
the two 6-digit operands while the lower branch shows the 12 digit quotient.

Advertising