Divides the target variable by a value each time the action executes.
The DIV instruction performs a division operation on the target variable. When the action activates, it divides the current value of the variable by the specified divisor.
This is useful for scaling operations, averaging calculations, or reducing values by a fixed ratio.
Dividing by zero will cause an error. Always ensure the divisor is a non-zero value.
When using
DIVwith theN(non-stored) qualifier, the division runs every scan cycle while the step is active. This will quickly reduce the value toward zero. UseActionQualifier.P(pulse) if you only want to divide once.

from automation_machine import ActionQualifier, ActionInstruction
step.add_action("variable_name", "Description", qualifier=ActionQualifier.P, instruction=ActionInstruction.DIV)
self.add_step())ActionQualifier.P to divide once on step activationActionInstruction.DIV