527
SQR, SQRP
1
2
3
4
4
6
7
8
7.12
Special function
instructions
7.12.1
9
SQR
, SQRP
Operat
i
on
E
rror
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns on, and an error code is stored into
SD0.
Program
E
xamp
l
e
(1) The following program raises the 64-bit floating-point data type real number specified by D200 to D203 to the number nth
specified by D0 to D3 power, when X10 is turned on. Then the program stores the operation result into D100 to D103.
[Ladder Mode]
[List Mode]
[Operation]
: Data of which the square root is obtained or head number of the devices where the data is stored (real number)
: Head number of the devices where the operation result will be stored (real number)
*1:
Applicable for the Universal model QCPU, LCPU.
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4140
The value specified by or is out of the range shown below.
0, 2
-1022
| Set value (storage value) | < 2
1024
The value of or is -0.
––
––
––
––
4141
The operation result is within the following range (when an overflow
occurs):
2
1024
| Operation result |
––
––
––
––
7.12.19 SQR, SQRP
Square root operation for floating-point data
(Single precision)
7.12.19
SQR, SQRP
• Basic model QCPU: The serial number (first five digits) is
"04122" or later.
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
E
Other
Bit
Word
Bit
Word
––
––
*1
––
––
––
*1
––
––
S1
S2
S1
S2
Step
I
nstruct
i
on
De
vi
ce
15
.
6
D203
D202
D201
D200
3796
.4
16
D103
D102
D101
D100
3
D3
D2
D1
D0
E
xponent
i
at
i
on
operat
i
on
Basic
Process
High
performance
Redundant Universal
LCPU
Ver.
Command
Command
S
Q
RP
SQR
SQRP
S
Q
R
S
D
S
D
S
D
S
D