
MotionSuite™ Series Machine Controller Motion Programming Manual Chapter 4: Sequence Commands
4-35
4.6.7 Square Root (SQT)
!
!!
! Outline
The SQT command leaves the square root of the integer and real number as a calculation
result. The 32-bit integer number data cannot be used.
!
!!
! Detailed Explanation
Command Method
Data Type
$
= Yes × = No
!
!!
! Program Example
Input unit and output results vary depending on the integer number and real
number data.
• Integer Number
The calculation format (shown below) is different from the mathematical
square root.
: Mark of the A register
: Absolute value of the A register
That is, the result of the mathematical square root is multiplied by
. When inputting a negative number, calculate the square root of
the absolute value, and leave the negative number as a calculation
result. The calculation error is ±2.
• Real Number
Use an immediate calculation result (real number data) as an input, and leave
the square root to the real number data.
Bit (B) Integer (W) 32-bit Integer (L) Real (F) Constant
×
$
×
$$
Type Motion Program Ladder Program
B— —
W MW00102=SQT(MW00100);
L— —
F
DF00202
=
SQT(DF00200);
MW00100=SQT(MW00101);
MW00100=SQT(100);
MF00200=SQT(MF00202);
MW00100
SQRT⇒MW00102
DF00200
SQRT⇒DF00202
32768
sign A
()
A
32768
⁄××
sign A
()
A
32768
Comentarios a estos manuales