Increments .CV on each rising edge of .CU, sets .Q to TRUE when .CV >= .PV, and resets .CV to 0 when the dedicated R operand is TRUE.
CTUR is a count-up counter with an explicit R (Reset) operand chip displayed directly on the action node in the Sequence Editor:
.CU — .CV increments by 1..CV >= .PV — Output .Q becomes TRUE..R (Reset) is TRUE — .CV resets to 0 and .Q becomes FALSE.PV (for example 50) and assign a boolean reset variable in the R operand chip.from automation_machine import ActionQualifier, ActionInstruction
step.add_action("batch_counter", "Count batch parts", qualifier=ActionQualifier.P, instruction=ActionInstruction.CTUR, preset_value=50, reset="batch_reset")
ActionQualifier.P to count once per step activationActionInstruction.CTURPV, for example 50)R) — Boolean variable or expression that resets .CV to 0| Variable | Type | Description |
|---|---|---|
.CU |
BOOL |
Count-up input — rising edge increments .CV |
.R |
BOOL |
Reset input — resets .CV to 0 and .Q to FALSE |
.Q |
BOOL |
Output signal — TRUE when .CV >= .PV |
.PV |
INT |
Preset target count |
.CV |
INT |
Current accumulated count |