Absolute value ABS

Dest = Source without its sign.

TagAfter two scans
Error-8
ErrorAbs8

How it works

While the rung is true, writes Source without its minus sign, so -8 becomes 8. A false rung changes nothing.

How it's used

Use ABS when only the distance from a target matters, not the side.

TagValue
Level42
Target50
Error-8
ErrorSize8
OffTarget1

Level is 8 below the target. ErrorSize is 8, so OffTarget is on.

Operands

OperandData typeRead or write
SourceDINT, REAL or a numberReads
DestDINT, REALWrites

Common mistakes

  • Using the smallest DINT-2147483648 has no positive DINT, so it is a fault.