527
SQR, SQRP
1
2
3
4
4
6
7
8
7.12 Special function instructions
7.12.19 SQR, SQRP
Operation Error
(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 Example
(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 ope ration for floating-po int data
(Single pre cision)
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
Instruction
Device
15.6
D203 D202 D201 D200
3796.416
D103 D102 D101 D100
3
D3 D2 D1 D0
Exponentiation
operation
Basic
Process
High
performance
Redundant
Universal
LCPU
Ver.
Command
Command
SQRP
SQR
SQRP
SQRSD
S D
S
D
S
D