ABS (x) returns the absolute value of x (the positive value of operand one).
Syntax:
'external reference' := ABS(Real value);
Example:
VAR T63; T64; T17; T18; (* Temporary values *) END_VAR; T63 := -4.6; T64 := 5.2; T17 := ABS(T63); T18 := ABS(T64);
The above example shows T63 set to the value of -4.6 and T64 set to the value of 5.2. T17 is set to the result of ABS(T63), which is +4.6 and T18 is set to the result of ABS(T64), which is +5.2.