autoincrement

This block is part of the number group and was last modified in core v10.4.28.

autoincrement v10.4.28

In pins 3
  • Key required
    value
  • Initial Number required
    number
  • Expire
    date
Out pins 1
  • number
    number

Atomically increments a Redis-backed counter named by the key pin (namespaced per entity, with a separate counter for simulation runs) and outputs the new integer value. When the counter is missing or below initial_number it is first reset to initial_number (clamped to >= 0) and then incremented, so the first call outputs initial_number + 1. Outputs 0 when key is empty or Redis is unavailable; a wired expiry pin sets the counter TTL in seconds.

A typical wiring for autoincrement: the number out pin feeds cast to value.

Studio canvas example for the autoincrement block: typical wiring for autoincrement.

Version history

Introduced in v10.4.28.


Back to number Return to the main group to view all sub-groups Back to number Return to the group to view all blocks within this group