Siemens SIMATIC S7 System Manual page 193

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

● EXP: Natural exponential (e
● EXPT: General exponential (IN1
● FRAC: Fraction (fractional part of floating point number IN = OUT)
● SIN: Sine (sin(IN radians) = OUT)
● COS: Cosine (cos(IN radians) = OUT)
● TAN: Tangent (tan(IN radians) = OUT)
Table 7- 59
Examples of floating-point math instructions
LAD / FBD
SCL
out := SQR(in);
or
out := in * in;
out := EXPT(in1, in2);
or
out := in1 ** in2;
For LAD and FBD: Click the "???" (by the instruction name) and select a data type from the drop-down menu.
1
For SCL: You can also use the basic SCL math operators to create the mathematical expressions.
2
Table 7- 60
Data types for parameters
Parameter
Data type
IN, IN1
Real, LReal, Constant
IN2
SInt, Int, DInt, USInt, UInt,UDInt, Real, LReal, Constant
OUT
Real, LReal
Table 7- 61
ENO status
ENO
Instruction
1
All
0
SQR
SQRT
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
EXPT parameters IN1 and OUT are always the same data type, for which you must
select Real or LReal. You can select the data type for the exponent parameter IN2 from
among many data types.
ASIN: Inverse sine (arcsine(IN) = OUT radians), where the sin(OUT radians) = IN
ACOS: Inverse cosine (arccos(IN) = OUT radians), where the cos(OUT radians) = IN
ATAN: Inverse tangent (arctan(IN) = OUT radians), where the tan(OUT radians) = IN
Condition
No error
Result exceeds valid Real/LReal range
IN is +/- NaN (not a number)
IN is negative
=OUT), where base e = 2.71828182845904523536
IN
= OUT)
IN2
Description
Square: IN
= OUT
2
For example: If IN = 9, then OUT = 81.
General exponential: IN1
For example: If IN1 = 3 and IN2 = 2, then OUT = 9.
100BBasic instructions
= OUT
IN2
Description
Inputs
EXPT exponent input
Outputs
Result (OUT)
Valid result
+INF
+NaN
-NaN
7.5 Math
193

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents