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

Parameter | Parameter Type | Data Type | Description |
---|---|---|---|
CD | Input | BOOL | Counts down.
|
LOAD | Input | BOOL | Load verifies the PV value against the count down value.
|
PV | Input | DINT | Programmed maximum value of the counter. |
Q | Output | BOOL | Indicates whether the count down instruction has resulted in a number less than or equal to the maximum value of the counter.
|
CV | Output | DINT | Current counter value. |
CTD examples
CTD function block diagram example

CTD ladder diagram example

CTD structured text example

(*ST Equivalence: CTD1 is an instance of block *) CTD1(trigger,load_cmd,100); underflow := CTD1.Q; result := CTD1.CV;
Results

Provide Feedback