Math

Math instructions copy values and compute: add, subtract, multiply, divide.

What it does

They run when the rung is true and write the result into a destination variable. MOVE copies a value; ADD, SUB, MUL, DIV and MOD work on two values; CPT computes a whole expression. Watch the result type: an integer division drops the decimals.

When to use it

Scale a measurement, compute a flow, change a preset, convert units, total a production.

In this category