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

Programming
Chapter 3
3Ć46
Figure 3.45
AF4 Reciprocal Function Format After Execution
17 16 15 14 13 12 11 10 7 6 5 4 3 2 1 0
Bit No.
Data Address
Result Address
D
E
E = Enable Bit (1 = Function in Progress)
D = Done Bit (1 = Function Complete)
11513
S = Sign Bit (1 = Negative)
S
S
ER
Operand
Result
ER = Error Bit (Illegal Operand, 1 = Input is 0)
(0)
(0) (0) (0) (0)
0
0
0
1
2
4
0
0
8
0
6
4
Entry and Display of Input and Result Values
Figure 3.45 shows one method of inserting input values and displaying input
values and results of an AF4 reciprocal function. Although there are several
techniques for accomplishing this, we chose get instructions. The first rung
requests execution of an AF4 reciprocal function. The top branch of the second
rung shows the 6-digit operand while the lower branch shows the 6-digit result.
Figure 3.46
AF4 Reciprocal Function Input and Result Display Rungs
201
124
G
305
G
306
064
G
G
200
000
008
Bit
Storage
Execute Aux
Function
Function Number:
Data Addr:
Result Addr:
305
34
200
Error Message
If you try to find the reciprocal of zero, the error bit (bit 145) is set and the
result reads zero.