Counts each time Count Trigger arrives and outputs an integer to Count Output. Reset Trigger returns it to Min Value, not to 0.
- The initial values are
Min Value = 0, Max Value = 100, Loop = ON
- The counting direction is determined by which of Max and Min is larger. If Max > Min it is +1, if Max < Min it is -1, and if Max and Min are equal the value does not move even when Count Trigger fires
- When Loop is ON, going above Max wraps around to Min, and going below Min wraps around to Max
- The node has Count / Min / Max fields and a Loop toggle, and Count can be edited directly
When Loop is OFF, the value does not stop. The handling for going out of range is only implemented for the looping case, so with Loop OFF it keeps increasing past Max (the same applies in the decreasing direction). If you want it to stop at the limit, place a Math Min / Max downstream to bound it.
Input ports
| Port ID | Type |
Count Trigger | trigger |
Reset Trigger | trigger |
Min Value | int |
Max Value | int |
Loop | bool |
Output ports
| Port ID | Type |
Count Output | int |
Scriptable members
| Path | Type |
minValueInput | int |
maxValueInput | int |
loopInput | bool |
currentCount | int |
minValue | int |
maxValue | int |
loop | bool |
Synapse Apps (scripting)
await synapse.modules.create({ type: "Counter" })