Bcd 4-Digit Square Roots, Bcd 8-Digit Square Roots - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

BCD 4-digit square roots, BCD 8-digit square roots

BSQR(P), BDSQR(P)
Basic
High
Process
Redundant Universal
performance
BSQR,BDSQR
BSQRP,BDSQRP
(S): Data of which the square root is obtained or the number of the device where the data is stored (BSQR(P): BCD 4 digits, BDSQR(P): BCD 8 digits)
(D): Head number of the devices where the operation result will be stored (BCD 4 digits)
Setting
Internal device
data
Bit
Word
(S)
(D)
Processing details
■BSQR
• Returns the square root of the value designated at (S), and stores the operation result in the device number designated at
(D).
D
S
Integer part
• Values that can be designated at (S) are BCD values with a maximum of 4 digits (from 0 to 9999).
• The operation results of (D) and (D)+1 are stored as their respective BCD values of between 0 and 9999.
• Operation results are rounded off from the fifth decimal place. For this reason, the fourth decimal place has an error of 1.
■BDSQR
• Calculates the square root of the values designated by (S) and (S)+1 and stores the results at the device designated by (D).
S
S
(
+1
)
2-word data
• BCD value of 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 of between 0 and 9999.
• Operation results are rounded off from the fifth decimal place. For this reason, the fourth decimal place has an error of 1.
Operation error
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Error
Error details
code
4100
The data specified in (S) is not a BCD value.
LCPU
Command
Command
R, ZR
J\
Bit
D
+1
Decimal fraction part
.
D
D
+1
Integer part
Decimal fraction part
.
P
U\G
Zn
Word
Q00J/
QnH
QnPH
Q00/
Q01
7 APPLICATION INSTRUCTIONS
7.12 Special Function Instructions
BSQR/BDSQR
S
D
S
D
Constant
Others
K, H
QnPRH
QnU
LCPU
7
647

Advertisement

Table of Contents
loading

Table of Contents