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

Programming
Chapter 3
3Ć17
Figure 3.8
AF4 Subtraction Function Format After Execution
17 16 15 14 13 12 11 10 7 6 5 4 3 2 1 0
S
0
2
Bit No
Data Address
Operand 1
Operand 2
S
Result Address
Result
D ER
E
E = Enable Bit (1 = Function in Progress)
S = Sign Bit (1= Negative)
D = Done Bit (1 = Function Complete)
ER = Error Bit (1 = Overflow)
11486
201
202
203
204
305
306
(0)
S
(0)
1
4
6
7
5
6
2
8
4
3
5
3
1
3
8
6
(0) (0) (1) (0)
Entry and Display of Input and Result Values
Figure 3.9 shows one method of inserting input values and displaying input
values and results of AF4 subtraction computations. Although there are several
techniques for accomplishing this, we chose get instructions. The first rung
requests an AF4 subtraction. The second rung shows the two operands in its top
branch and the resultant difference in its lower branch.
Figure 3.9
Af4 Subtraction Function Input and Result Display Rungs
201
102
G
202
746
G
203
256
G
204
384
G
305
153
G
306
638
G
Bit
Storage
Execute Aux
Function
Function Number:
Data Addr:
Result Addr:
02
201
305