Ladder Logic Absolute Value Function

KronoTech

PLC

Ladder Logic

Basic

Counters

Timer

Arithmetic

Comparison

Functions

ABS

CLR

CPT

SCL

SCP

SQR

SWP

XPY

Trig Functions

RSLogix 5000

Structured Text

HMI

Instruments

ABS - Absolute Value

Absolute value |x| of a number x is itself, if x is positive or zero, but if x is negative, then its absolute value |x| is its negation –x, that is, the corresponding positive value. For example, |-1| = 1, but |2| = 2. The absolute value function strips a number of its sign.

Example

Equation: N7:120 = ABS (-10)

Ladder Logic Solution:

ABS - SLC 500 Beginners Guide

Example

Equation: N7:121 = ABS (-25)

Ladder Logic Solution

ABS - SLC 500 Beginners Guide

Note

  • If the source is = 32768 (integer) this will generate a minor error fault. This error should be cleared to avoid a major error.

Example

Equation: F8:120 = ABS (-1.2345)

Ladder Logic Solution

ABS - SLC 500 Beginners Guide

Note

  • If the source is a floating point then no overflow error will occur.

Quick Links

PLC Languages

Ladder Logic
Function Block
Structure Text
SFC
Mnemonic

Ladder Logic

Basic
Counters
Timer
Arithmetic
Comparison
Functions
Trig Functions

Instruments

Switches

HMI

Advantages
Alarms
Trends

Other

Bottle Application