Counter Building Block

The Counter building block is used to increment or decrement a Number value.

A Counter building block has three ON/OFF input values and one Number output value. When the "+" input turns ON, the output value will increment. When the "–" input turns ON, the output value will decrement. When the "RESET" input is ON, the output will be set to the initial value.

To configure a Counter building block, set the initial value, minimum value, maximum value, and the increment size in the Inspector window.

The output value will be limited by the minimum and maximum count values. When the output has reached one of its limits, the block can be configured to leave the output to at the same value, reset the output to the initial value, or set the output to the opposite limit when the next increment occurs.

In the example to the right, the building block's output value will count between 0 and 5, adding or subtracting 1 at a time. When the output reaches the highest possible value, it will remain the same if the "+" input turns ON.