Table of Contents

ABS

Function name

ABS

ST call

PROGRAM ABS_DEMO
   VAR
     REAL1,REAL2: REAL;
  END_VAR
 REAL2:= ABS(IN:=REAL1);
END_PROGRAM

Description

Returns the absolute value of a number. An absolute value is a number of the same size but with no sign.

Inputs

InputType Description
IN ANY_NUMInput value

Outputs

OutputType Description
ANY_NUMOutput value

Application example