2 Instruction Descriptions
2-180
NJ-series Instructions Reference Manual (W502)
SQRT
The SQRT instruction finds the square root of a number.
*1 Negative numbers are excluded.
*2 If you omit an input parameter, the default value is not applied. A building error will occur.
*3 The valid range is 0.000000e+00 to 1.844674e+19 or positive infinity for REAL data. The valid range is
0.00000000000000e+000 to 1.34078079299425e+154 or positive infinity for LREAL data.
The SQRT instruction finds the square root of number to process In. The data types of In and square
root Out can have different data types.
Instruction Name FB/FUN Graphic expression ST expression
SQRT Square Root FUN Out:=SQRT(In);
Variables
Name Meaning I/O Description Valid range Unit Default
In Number to
process
Input Number to process Depends on data type.
*1
---
*2
Out Square root Output Square root
*3
--- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In OK OK
Out OK OK
Function
(@)SQRT
EN ENO
In Out
01 4
1
2
In
Out