Skip to main content

7.4.1 ABS

Function

Calculate the absolute value

LD graphics

alt text

Parameter description

Integer, floating point and various duration types

Interface variableDeclarationData typeDescription
XVar_InputANY_MAGNITUDEOperand
Function nameReturn valueANY_MAGNITUDEOutput result
NOTE
  • ANY_MAGNITUDE: Contains various integers, floating point numbers, and duration types (TIME, LTIME)

Example

  • LD example is shown in the following animation:

alt text

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