M800V/M80V Series PLC Programming Manual (1/2)
8 Function Instructions
8.11 Special Function Instructions
Functions
BSQR
Returns the square root of the value designated by (S) and stores the operation result in the device number designated by
(D).
S
=
BCD values with a maximum of 4 digits (0 to 9999) can be designated by (S).
The operation results of (D) and (D+1) are stored as their respective BCD values from 0 to 9999.
The operation results are truncated from the 5th digit of the decimal fraction part.
BDSQR
Returns the square root of the value designated by (S) and (S+1) and stores the operation result in the device number des-
ignated by (D).
S+1
S
(
2-word data
BCD values with a maximum of 8 digits (0 to 99999999) can be designated by (S) and (S+1).
The operation results of (D) and (D+1) are stored as their respective BCD values from 0 to 9999.
The operation results are truncated from the 5th digit of the decimal fraction part.
Operation errors
In the following cases, an arithmetic error occurs, the error flag (SM0) turns ON, and an error code is stored at SD0.
- The data designated by (S) is not a BCD value. (Error code: 34)
D
D+1
Decimal
Integer part
.
fraction part
D
D+1
)
Decimal
=
Integer part
.
fraction part
409
IB-1501667-B