High−level Instructions
3 − 435
Outline Takes the square root of the specified 32-bit data.
For the FP0R, FPΣ and FP−X, the P type high−level instruction “P160
(PDSQR)” is not available.
Program example
Boolean
Ladder Diagram
Address Instruction
10
F160 DSQR, DT10 , DT20
S
D
Trigger
R0
10
11
ST R 0
F160 (DSQR)
DT 10
DT 20
S
32-bit equivalent constant or lower 16-bit area of 32-bit area for storing data to
be calculated
D Lower 16-bit area of 32-bit area for storing the calculated result
Operands
modifier
S A A A A A A A A A A N/A A A A
D N/A A A A A A A A A A N/A N/A N/A A
(*1) This cannot be used with the FP0R, FPΣ and FP−X.
(*2) With the FP0R, FPΣ,FP−X, FP2, FP2SH, and FP10SH, this is I0 to IC.
Explanation of example
The square root of 32−bit data stored in DT11 and DT10 is calculated and stored in DT21 and DT20 when R0
turns on.
When K64 is stored in DT11 and DT10, the following occurs.
F160
P160
(PDSQR)
(DSQR)
32-bit data square root
A: Available
N/A: Not Available
····
Bit position
·····
Binary data
15
0
1211
00
8
0
7
00
4
0
3
0
0
R0: on
Destination [D+1, D]: K8
Decimal data
·········
15
0
12
0
11
0
8
0
7
0
4
0
3
10
0
0
Higher 16-bit area Lower 16-bit area
DT21 DT20
····
Bit position
·····
Binary data
15
0
1211
00
8
0
7
00
4
0
3
0
0
Source data [S+1, S]: K64
Decimal data
·········
15
0
12
0
11
0
87
0
4
0
3
00
0
0
Higher 16-bit area Lower 16-bit area
DT11 DT10
0010000000000000
K64
000000000000000
K8