AutomationView Documentation

CTUR (Resettable Count-Up Counter)

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.


Description

CTUR is a count-up counter with an explicit R (Reset) operand chip displayed directly on the action node in the Sequence Editor:


Syntax

Sequence Visual Editor

  1. Select an action on a step and open the Instruction picker (Alt or right-click -> Edit Qualifier & Instruction).
  2. Select Counters -> CTUR and choose the P (Pulse) qualifier.
  3. Enter the target count in PV (for example 50) and assign a boolean reset variable in the R operand chip.

Python

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")

Parameters


Counter Variables

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

See Also