Attention

IronPLC can only run very simple programs. The steps described are accurate but many language features are not yet supported.

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