Computes the remainder of IN1 divided by IN2 (IN1 MOD IN2) and writes the result to the target variable.
The MOD instruction calculates the modulo remainder of two numeric operands (src1 and src2) and stores the result in the target variable.
Common uses include:
(index + 1) MOD capacity).cycle_count MOD 2).slot_index MOD columns).When using
MODwith theN(non-stored) qualifier, the calculation runs every scan cycle while the step is active. UseActionQualifier.P(pulse) to compute once when the step activates.
IN1), and divisor (IN2) operand chips.from automation_machine import ActionQualifier, ActionInstruction
step.add_action("slot_col", "Compute column index", qualifier=ActionQualifier.P, instruction=ActionInstruction.MOD, src1="part_index", src2="4")
ActionQualifier.P for a single execution on step activationActionInstruction.MODIN1)IN2)