UpAndDownCounter Block

UpAndDownCounter

This block output is a numeric value that increases or decreases based on the given inputs.

When the increase input goes from FALSE to TRUE (rising edge detection) the output value is increased by one. (+1)

When the decrease input goes from FALSE to TRUE (rising edge detection) the output value is decreased by one. (-1)

The output value does not go below zero, so it cannot be a negative number.

When the reset input is TRUE, the output value resets to zero.

Input:

  • increase (boolean)

  • decrease (boolean)

  • reset (boolean)

Output:

  • result (number)