ADD (Addition)
Adds a value to the target variable each time the action executes.
Description
The ADD instruction performs an addition operation on the target variable. When the action activates, it adds the specified value (defaulting to 1) to the current value of the variable.
This is commonly used for incrementing counters, accumulating totals, or adjusting numeric setpoints during a process.
When using
ADDwith theN(non-stored) qualifier, the addition runs every scan cycle while the step is active. If you only want to add once when the step activates, useActionQualifier.P(pulse) instead.
Syntax
- step: the parent step object (from
self.add_step()) - variable_name: the numeric variable to modify
- qualifier: typically
ActionQualifier.Pfor a single addition on step activation - instruction: must be
ActionInstruction.ADD
Sequence Visual Editor

Python
from automation_machine import ActionQualifier, ActionInstruction
step.add_action("variable_name", "Description", qualifier=ActionQualifier.P, instruction=ActionInstruction.ADD)
See Also
- SUB (Subtraction): subtract from a variable
- MUL (Multiplication): multiply a variable
- DIV (Division): divide a variable
- CTU (Count-Up Counter): dedicated counting function block
- Action Qualifiers Overview
- Instructions Overview