Back to FBD referenceTypical FBD symbol for CTD
Counters
CTD
Count-down counter
The CTD block decrements an internal counter on rising edges of CD. In the current implementation, R returns the counter to PV.
Typical FBD symbol
CD
R
CTD
Q
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| CD | BOOL | Yes | Count-down input. Rising edges are counted. |
| R | BOOL | Yes | Reset that returns the counter to PV. |
Outputs
| Name | Type | Required | Description |
|---|---|---|---|
| Q | BOOL | Yes | TRUE when count has reached 0 or below. |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| PV | number | No | 1 | Starting count value. |
Stateful
Yes, the block keeps internal state between scans.
Behavior rule
Counts CD edges down from PV to 0; when R = TRUE returns the counter to PV; Q = TRUE when count reaches 0 or below.
Practical use
- counting down remaining parts or operations.
What to watch
- Confusing reset with zeroing: in the current logic, R returns CTD to PV.