Arithmetic Operations

PLCopen motion icon

Standard Operators

These are the standard operators that perform arithmetic operations:

Operator

Description

Addition +

Performs an addition of all inputs.

Divide /

Performs a division of all inputs.

Multiply *

Performs a multiplication of all inputs.

NEG -

Performs a negation of the input. (unary operator)

Subtraction -

Performs a subtraction of all inputs.

Standard Functions

These are the standard functions that perform arithmetic operations:

FunctionClosed A function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances.

Description

limit

Limits a numeric value between low and high bounds.

max

Get the maximum of two integers.

min

Get the minimum of two integers.

mod / modLR / modR

Calculation of modulo.

odd

Test if an integer is odd.

SetWithin

Force a value when inside an interval.