Appearance
Accumulator
Overview
The Accumulator node maintains a running sum by adding each numeric input to a stored total. Use it to track cumulative values like total weight, volume, or signal counts.
Use Accumulator when:
- Summing values across multiple messages in a flow.
- Tracking total measurements over time.
💡 Tip
Use the reset input to clear the accumulated total when starting a new batch or process.
Inputs
| Name | Type | Description |
|---|---|---|
| input | number | Numeric value to add to the running total. |
| reset | any | Signal to reset the accumulator to 0. |
Outputs
| Name | Type | Description |
|---|---|---|
| value | number | The current accumulated total. |
Parameters
| Parameter | Default | Valid values | Tunable |
|---|---|---|---|
| Enable automatic state reset | false | boolean | ❌ |
Enable automatic state reset
Resets the accumulated total to 0 when any signal (except None or Nothing) is received by the reset input of the node.
Example
Total weight tracking
A flow receives individual weight readings from a sensor. The Accumulator tracks the total weight until a "Batch Complete" signal resets it.
Configuration:
- Enable automatic state reset:
false
Result: Each new weight reading increases the output value, providing a live total of the batch.
Related links
Reference: