Counter

This function block is designed to serve as a cumulative counter, allowing for the integration of numerical inputs over time. It can add numbers and reset to zero based on a boolean input.

πŸ“₯ Inputs

Number A numerical input that will be added to the cumulative count.

Reset A boolean input signal that, when true, resets the counter to zero.

πŸ“€ Outputs

Number The current value of the cumulative counter.

πŸ•ΉοΈ Controls

Input Size A dropdown that allows you to specify how many input sockets you want the block to have, ranging from 2 to 20.

Select a Method A dropdown that presents different methods for mathematical operations (though currently this block primarily focuses on cumulative addition).

🎨 Features

Dynamic Socket Adjustment Users can dynamically change the number of input sockets depending on their needs.

Integration and Reset Functionality The counter can accumulate values and reset itself based on input conditions, enabling flexible tracking of numerical values.

πŸ“ Usage Instructions

  1. Set Input Size: Use the "Input Size" dropdown to set how many numbers you wish to input to the counter.

  2. Connect Inputs: Link the relevant sources to the Number and Reset inputs.

  3. Run the Block: Evaluate the block to see how the cumulative count changes as numbers are fed into it. The output will reflect the total count.

πŸ“Š Evaluation

Upon execution, the function block accumulates the values received through its input, providing a continuous output of the total count. The counter resets if the Reset input is activated.

πŸ’‘ Tips and Tricks

Using Multiple Inputs

You can connect multiple sources to the counter to track several numerical streams simultaneously. It dynamically adjusts to the input size you've set.

Resetting the Counter

Make sure to actively send the Reset signal when you want to clear the count. This allows for periodic resets in your calculations.

πŸ› οΈ Troubleshooting

Counter Not Resetting

Ensure that the boolean input connected to the Reset socket is set to true when you want to reset the count.

No Output Value

If you do not see any output, double-check that there is an active connection providing a numerical value to the Number input.

Last updated