Absolute Value Instruction - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

100BBasic instructions
7.5 Math
Table 7- 48
Data types for parameters
Parameter
Data type
IN/OUT
SInt, Int, DInt, USInt, UInt, UDInt
Table 7- 49
ENO status
ENO
Description
1
No error
0
The resulting value is outside the valid number range of the selected data type.
Example for SInt: INC (+127) results in +128, which exceeds the data type maximum.
7.5.6

Absolute value instruction

Table 7- 50
ABS instruction
LAD / FBD
SCL
out := ABS(in);
For LAD and FBD: Click the "???" and select a data type from the drop-down menu.
1
Table 7- 51
Data types for parameters
Parameter
Data type
IN
SInt, Int, DInt, Real, LReal
OUT
SInt, Int, DInt, Real, LReal
The IN and OUT parameters must be the same data type.
1
Table 7- 52
ENO status
ENO
Description
1
No error
0
The math operation result value is outside the valid number range of the selected data type.
Example for SInt: ABS (-128) results in +128 which exceeds the data type maximum.
190
Description
Calculates the absolute value of a signed integer or real number at parameter
IN and stores the result in parameter OUT.
1
Description
Math operation input and output
Description
Math operation input
Math operation output
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents