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
258 System Manual, V4.2, 09/2016, A5E02486680-AK
Table 8- 46 ENO status
ENO
Description
1
No error
0 The Math operation result value would be outside the valid number range of the data type selected. The
least significant part of the result that fits in the destination size is returned.
0
Division by 0 (IN2 = 0): The result is undefined and zero is returned.
0 Real/LReal: If one of the input values is NaN (not a number) then NaN is returned.
0 ADD Real/LReal: If both IN values are INF with different signs, this is an illegal operation and NaN is re-
turned.
0 SUB Real/LReal: If both IN values are INF with the same sign, this is an illegal operation and NaN is re-
turned.
0 MUL Real/LReal: If one IN value is zero and the other is INF, this is an illegal operation and NaN is re-
turned.
0
DIV Real/LReal: If both IN values are zero or INF, this is an illegal operation and NaN is returned.
8.5.3
MOD (return remainder of division)
Table 8- 47 Modulo (return remainder of division) instruction
LAD / FBD
SCL
Description
out := in1 MOD in2;
You can use the MOD instruction to return the remainder of an integer
division operation. The value at the IN1 input is divided by the value at
the IN2 input and the remainder is returned at the OUT output.
1
For LAD and FBD: Click the "???" and select a data type from the drop-down menu.
Table 8- 48 Data types for parameters
Parameter
Data type
1
Description
IN1 and IN2
SInt, Int, DInt, USInt, UInt, UDInt, Constant
Modulo inputs
OUT SInt, Int, DInt, USInt, UInt, UDInt Modulo output
1
The IN1, IN2, and OUT parameters must be the same data type.
Table 8- 49 ENO values
ENO
Description
1 No error
0
Value IN2 = 0, OUT is assigned the value zero

Table of Contents

Other manuals for Siemens SIMATIC S7-1200

Related product manuals