Siemens SIMATIC S7 System Manual page 304

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

Program instructions
7.8 Math
Square root (SQRT) instruction
LAD / FBD
STL
SQRT IN, OUT
Non-fatal errors with ENO = 0
0006H Indirect address
SM1.1 Overflow
Input / outputs
Data type
IN
REAL
1
OUT
REAL
1
Real (or floating-point) numbers are represented in the format described in the ANSI/IEEE 754-1985 standard (single-
1
precision). Refer to that standard for more information.
304
Description
The Square Root instruction (SQRT) takes the square root of a real number (IN)
and produces a real number result OUT.
SQRT (IN)= OUT
To obtain other roots:
5 cubed = 5^3 = EXP(3*LN(5)) = 125
The cube root of 125 = 125^(1/3) = EXP((1/3)*LN(125))= 5
The square root of 5 cubed = 5^(3/2) = EXP(3/2*LN(5)) = 11.18034
SM bits affected
SM1.0 Result of operation = zero
SM1.1 Overflow, illegal value generated during the operation, or illegal input
SM1.2 Negative result
Operand
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC, Constant
ID, QD, VD, MD, SMD, SD, LD, AC, *VD, *LD, *AC
System Manual, V2.3, 07/2017, A5E03822230-AF
S7-200 SMART

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-200 smart

Table of Contents