Count Up
easy
Up-counter that fires a done signal when count reaches 10.
What it teaches
Count how many times something happens. The counter ticks up only on the moment a signal turns on (not while it's held), so each press counts once. A 'done' signal fires when the count reaches a preset target.
Parameters
| Tag | Direction | Type | Default | Description |
|---|---|---|---|---|
| In_Count | Input | BOOL | 0 | Count input pulse |
| In_Reset | Input | BOOL | 0 | Reset signal |
| Sts_Done | Output | BOOL | 0 | Done flag |
Required behavior
- Sts_Done is 1 once 10 or more rising edges of In_Count have occurred since the last reset.
- In_Reset clears Sts_Done and the rising-edge tally.