ABS (absolute value)
The ABS instruction returns the absolute (positive) value of a Real value.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the
Micro810
LC10, Micro820
L20E, Micro850
L50E, and Micro870
L70E controllers.ABS

Parameter | Parameter Type | Data Type | Description |
|---|---|---|---|
EN | Input | BOOL | When set to true, the instruction is enabled.
|
IN | Input | REAL | Any signed Real value. |
ABS | Output | REAL | Absolute value (always positive). |
ENO | Output | BOOL | Enables output. Applies to ladder diagram programs. |
ABS examples
ABS function block diagram example

ABS ladder diagram example

ABS structured text diagram example

(* ST Equivalence: *) over := (ABS (delta) > range);
Results

Provide Feedback