Attention

IronPLC supports IEC 61131-3 Structured Text excluding I/O mapping.

ABS

Returns the absolute value of a numeric input.

IEC 61131-3

Section 2.5.1.5.2

Support

Supported

Signatures

#

Input (IN)

Return Type

Support

1

SINT

SINT

Supported

2

INT

INT

Supported

3

DINT

DINT

Supported

4

LINT

LINT

Supported

5

REAL

REAL

Supported

6

LREAL

LREAL

Supported

Description

Returns the absolute value of IN. For signed integer types, the result of ABS applied to the most negative value is undefined because the positive value cannot be represented.

Example

See Also

  • SQRT — square root

  • EXPT — exponentiation