Sqr (square root), Function, N is a number – Yaskawa LEGEND-MC User Manual
Page 221

211
LEGEND-MC User’s Manual
@SQR (Square Root)
[Function]
DESCRIPTION:
@SQR returns the square root of a number or variable given in square brackets. Note that the @SQR command is a
function, which means that it does not follow the convention of the commands, and does not require the underscore
when used as an operand. This function will treat negative numbers as positive numbers.
ARGUMENTS: @SQR [n]
where
n is a number
USAGE:
EXAMPLES:
While Moving
Yes
Minimum n value
0
In a Program
Yes
Maximum n value
2147483647.9999
Not in a program
Yes
Default Value
---
Can be Interrogated
No
Default Format
---
Used as an Operand
Yes
Distributed Control
No, Local
#TEST
Program TEST
VAR1=60
Set variable
MG @SQR[VAR1]
Display the value of the sine of VAR1
VAR2=@SQR[VAR1]+9
Perform calculation
EN
End of program