7 square root (sqt), 1) overview, 2) format – Yaskawa MP2000 Series: User's Manual for Motion Programming User Manual
Page 250
8.9 Basic Functions
8-143
8
Command Reference
8.9.7 Square Root (SQT)
(1) Overview
The SQT command returns the square root of an integer or real number as the operation result. Double integer
data cannot be used.
(2) Format
Note: The input units and output results are different for integer and real number data.
• Integer Data
The result is different from that obtained for the mathematical square root, and is calculated using the
following formula:
That is to say, the output is the result of the mathematically expressed square root multiplied by 32768.
When the input is a negative number, an absolute square root is calculated, and the negative number is
taken as the operation result. The operation error is a maximum of
±2.
• Real Number Data
The SQT command uses the immediately preceding operation result (real number data) as input and
returns the square root in a real number register.
Motion Programs
Sequence Programs
Applicable
Applicable
MW00100 = SQT (100);
A B
Item Description
Usable Registers
A
Root value
output
• All integer and real number type registers (Excluding # and C registers)
• The above registers with subscript
• Subscript registers
B
Data input
• All integer and real number type registers (Excluding # and C registers)
• The above registers with subscript
• Subscript registers
• Constants
Example:
Input Value
Integer Data
Real Number Data
Positive
value input
Negative
value input
32768 sign(B)
∗
∗ B /32768
sign(B): Sign for data input
|B|: Absolute value of data input
MW00100 = SQT ( MW00102 ) ;
(01448)
(00064)
64 × 32768 = 1448
(8)
(181)
MF00100 = SQT ( MF00102 ) ;
(8.0)
(64.0)
MW00100 = SQT ( MW00102 ) ;
(-01448)
(-00064)
64 × 32768 = -1448
(8)
-
(181)
MF00100 = SQT ( MF00102 ) ;
(-8.0)
(-64.0)