7.4.1 ABS
Function
Calculate the absolute value
LD graphics
Parameter description
Integer, floating point and various duration types
| Interface variable | Declaration | Data type | Description |
|---|---|---|---|
| X | Var_Input | ANY_MAGNITUDE | Operand |
| Function name | Return value | ANY_MAGNITUDE | Output result |
NOTE
- ANY_MAGNITUDE: Contains various integers, floating point numbers, and duration types (TIME, LTIME)
Example
- LD example is shown in the following animation:

- ST example is shown in the following code:
OUT:=ABS(IN1);