EasyManua.ls Logo

Siemens SIMATIC S7-1200

Siemens SIMATIC S7-1200
1614 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Basic instructions
8.5 Math functions
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
261
8.5.7
MIN (Get minimum) and MAX (Get maximum)
Table 8- 59 MIN (get minimum) and MAX (get maximum) instructions
LAD / FBD
SCL
Description
out:= MIN(
in1:=_variant_in_,
in2:=_variant_in_
[,...in32]);
The MIN instruction compares the value of two parameters IN1
and IN2 and assigns the minimum (lesser) value to parameter
OUT.
out:= MAX(
in1:=_variant_in_,
in2:=_variant_in_
[,...in32]);
The MAX instruction compares the value of two parameters IN1
and IN2 and assigns the maximum (greater) value to parameter
OUT.
1
For LAD and FBD: Click the "???" and select a data type from the drop-down menu.
Table 8- 60 Data types for the parameters
Parameter
Data type
1
Description
IN1, IN2
[...IN32]
SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, Time,
Date, TOD, Constant
Math operation inputs (up to 32 inputs)
OUT SInt, Int, DInt, USInt, UInt, UDInt, Real, LReal, Time,
Date, TOD
Math operation output
1
The IN1, IN2, and OUT parameters must be the same data type.
To add an input, click the "Create"
icon or right-click on an input stub for one of
the existing IN parameters and select the "Insert input" command.
To remove an input, right-click on an input stub for one of the existing IN parameters (when
there are more than the original two inputs) and select the "Delete" command.
Table 8- 61 ENO status
ENO
Description
1
No error
0 For Real data type only:
At least one input is not a real number (NaN).
The resulting OUT is +/- INF (infinity).

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals