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 |
|
|
Not yet supported |
2 |
|
|
Not yet supported |
3 |
|
|
Supported |
4 |
|
|
Not yet supported |
5 |
|
|
Supported |
6 |
|
|
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¶
result := ABS(-42); (* result = 42 *)
value := ABS(REAL#-3.14); (* value = 3.14 *)