AutomationView Documentation

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 ADD with the N (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, use ActionQualifier.P (pulse) instead.


Syntax

Sequence Visual Editor

Screenshot showing the ADD instruction configuration in the visual editor, with the action set on a step, qualifier set to P (pulse), and instruction type set to ADD for a numeric variable

Python

from automation_machine import ActionQualifier, ActionInstruction

step.add_action("variable_name", "Description", qualifier=ActionQualifier.P, instruction=ActionInstruction.ADD)

See Also