Subtracts a value from the target variable each time the action executes.
The SUB instruction performs a subtraction operation on the target variable. When the action activates, it subtracts the specified value (defaulting to 1) from the current value of the variable.
This is commonly used for decrementing counters, counting down remaining items, or adjusting numeric setpoints.
When using
SUBwith theN(non-stored) qualifier, the subtraction runs every scan cycle while the step is active. If you only want to subtract once when the step activates, useActionQualifier.P(pulse) instead.

from automation_machine import ActionQualifier, ActionInstruction
step.add_action("variable_name", "Description", qualifier=ActionQualifier.P, instruction=ActionInstruction.SUB)
self.add_step())ActionQualifier.P for a single subtraction on step activationActionInstruction.SUB