CTU (count up)
The CTU instruction counts (integers) from 0 up to a given value, one by one.
Languages supported: Function block diagram, ladder diagram, structured text.
This instruction applies to the Micro810, L20E, L50E, and L70E controllers.
CTU

Parameter | Parameter Type | Data Type | Description |
---|---|---|---|
CU | Input | BOOL | Counts upward.
|
RESET | Input | BOOL | Reset verifies the PV value against the count upward value.
|
PV | Input | DINT | Programmed maximum value of the counter. |
Q | Output | BOOL | Indicates whether the count up instruction has resulted in a number greater than or equal to the maximum value of the counter.
|
CV | Output | DINT | Current counter result. |
CTU function block diagram example

CTU ladder diagram example

CTU structured text example

(* ST Equivalence: CTU1 is an instance of CTU block*) CTU1(trigger,NOT(auto_mode),100); overflow := CTU1.Q; result := CTU1.CV;
Results

Provide Feedback