Chapter 4. Ladder Diagram (LD) Programming
64
PACSystems* RX7i, RX3i and RSTi-EP CPU Programmer's Reference Manual
GFK-2950C
4.1.2
Square Root
Mnemonics:
SQRT_DINT
SQRT_INT
SQRT_REAL
SQRT_LREAL
When the Square Root function receives power flow, it finds the square root of IN and stores the
result in Q. The output Q must be the same data type as IN.
The power flow output is energized when the function is performed without
, unless one of
these invalid REAL operations occurs:
■
If IN < 0, Q is set to 0 and ENO is set FALSE.
■
If IN is a NaN (Not a Number), Q will also be a NaN value and ENO will be set false.
Example
The square root of the integer number located at %AI0001 is placed into %R00003 when %I00001 is
ON.
Operands for the Square Root Function
Parameter Description
Allowed Operands
Optional
IN
The value to calculate the
square root of. If IN < 0, the
function does not pass power
flow.
All except variables located in %S - %SC
No
Q
The calculated square root. All except constants and variables located in %S -
%SC
No
Summary of Contents for PACSystems RSTi-EP
Page 357: ......
Page 466: ...Chapter 9 Diagnostics GFK 2950C February 2018 451 ...