Counter

The counter counts up or down from zero or a preset number every time the corresponding functions are triggered. A counter can also count into the negative.

To quickly start with counters:

  1. Find the Functions panel on the left-hand side of the screen.

  2. Expand Utilities and then Counter.

  3. Create a counter instance with the create function.

  4. Expand the instance that appeared in the panel and get started with using the timer.

Use the create and delete functions to manage the existing timers. Existing timers can be seen in the functions panel on the left under Timer. Yellow ones are not instantiated and green ones are ready for use.

Creating a counter

To create a counter:

  1. Insert a counter name in the yellow field.

  2. Optionally insert a number for the initial state of the counter. (Only works if the counter is not yet instantiated.)

  3. Click the trigger field to create an instance of the counter. You should see the counter in the functions panel go from yellow to green.

Deleting a counter

To delete a counter:

  1. Insert the name of the existing counter you want to delete in the yellow field.

  2. Click the trigger field.

The instance in the functions panel will turn yellow again, until the yellow field of the create function is cleared, or the create function is deleted from the board.

Counter functions

To utilize counters, you can find functions tied to each instance when you expand the instance.

Incrementing a counter

Triggering the increment function increases the counter by 1.

Decrementing a counter

Triggering the decrement function decreases the counter by 1.

Resetting a counter

With reset you can set the counter to 0 or a new specified state. The input field has initial greyed out in it, because in the future reset should reset the function to the initial state. As such, please always enter a number for now.

  1. Insert or link a value in the input field.

  2. Trigger the function.

Getting the count

The getCount function returns the current count of the counter.

Last updated