
Programming
Chapter 3
324
4. Enter the value for the operand.
You can enter the value from the keyboard of your industrial terminal or
through ladder diagram functions. Entry of operand = 144 produces the result
12 when the square root function executes. Figure 3.20 shows how the result is
stored. The result is accurate to +
0.01.
Figure 3.20
AF1
Square Root Function Format After Execution
171615141312111076543210
S
44
Bit No.
Data Address
Operand
200
1
(0)
S
Result Address
Result
DE
305
306
120
000
(0) (0) (1)
E = Enable Bit (1 = Function in Progress)
S = Sign Bit (1= Negative)
D = Done Bit (1 = Function Complete)
11584
Entry and Display of Input and Result Values
Figure 3.21 shows one method for inserting the input value and displaying the
input value and result of an AF1 square root. Although there are several
techniques for accomplishing this, we chose get instructions. The first rung
requests an AF1 square root function. The second rung shows the operand 144
in word 200 and the resultant square root 012.000 in words 305 and 306.
Figure 3.21
AF1
Square Root Function Input and Result Display Rungs
Bit
Storage
200
144
G
305
012
G
306
000
G
Execute Aux
Function
Function Number:
Data Addr:
Result Addr:
05
201
305