EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-R Series - Calculating the Square Root of BCD 4-Digit Data

Mitsubishi Electric MELSEC iQ-R Series
2110 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
7 APPLICATION INSTRUCTIONS
7.9 Real Number Instructions
827
7
Calculating the square root of BCD 4-digit data
BSQRT(P)
These instructions calculate the square root of the value specified by a BCD 4-digit data.
Execution condition
Setting data
Descriptions, ranges, and data types
Applicable devices
Processing details
These instructions calculate the square root of the BCD 4-digit data specified by (s), and store the operation result in the
device specified by (d).
The value to be specified in (s) is a BCD value with a maximum of 4 digits (0 to 9999).
A BCD value from 0 to 9999.9999 is stored as the operation result in the device specified by (d).
The operation result is a value whose 5th decimal place is rounded down.
Ladder ST
ENO:=BSQRT(EN,s,d);
ENO:=BSQRTP(EN,s,d);
FBD/LD
Instruction Execution condition
BSQRT
BSQRTP
Operand Description Range Data type Data type (label)
(s) Data used for square root operation, or the device
containing the data
0 to 9999 BCD 4-digit ANY16
(d) Start device for storing the operation result BCD 4-digit ANY16_ARRAY
(Number of elements: 2)
EN Execution condition Bit BOOL
ENO Execution result Bit BOOL
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB,
FX, FY
J\ T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
U\G, J\,
U3E\(H)G
Z LT, LST,
LC
LZ K, H E $
(s)  
(d)  
(d): Integral part
(d)+1: Decimal part
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)
(s) (d)
EN ENO
ds
.
(d) (d)+1
=(s)

Table of Contents

Other manuals for Mitsubishi Electric MELSEC iQ-R Series

Related product manuals