Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Counter Block

Counter Block

The Counter block maintains a running counter of every iteration the input value was True (non-zero). It can be reset using its second inport.

Examples

Counter Example
Counts the number of times a randomly generated number is greater than 1, and resets when the counter exceeds 10