Appearance
Sum Int
Adds or subtracts 2 to 5 int inputs: out = Σ signₖ · inₖ, with each sign set to + or −. The number of input ports follows the Inputs setting, and the sign of each input is drawn next to its port. Use it to combine counters, offset a mode number or count how many int flags are set. To work on double signals, use Sum Double.
Category: Math
Ports
| Port | Kind | Signal | Notes |
|---|---|---|---|
in_1 | Control input | Integer | |
in_2 | Control input | Integer | |
in_3 | Control input | Integer | Shown when Inputs is at least 3 |
in_4 | Control input | Integer | Shown when Inputs is at least 4 |
in_5 | Control input | Integer | Shown when Inputs is at least 5 |
out | Control output | Integer |
Parameters
| Parameter | Type | Default | Units | Description | ID |
|---|---|---|---|---|---|
| Inputs | Choice: 2 / 3 / 4 / 5 | 2 | — | How many input ports the block has (2-5). | num_inputs |
| Sign 1 | Choice: + / − | + | — | Whether input 1 is added (+) or subtracted (−). | sign_1 |
| Sign 2 | Choice: + / − | + | — | Whether input 2 is added (+) or subtracted (−). | sign_2 |
| Sign 3 | Choice: + / − | + | — | Whether input 3 is added (+) or subtracted (−). | sign_3 |
| Sign 4 | Choice: + / − | + | — | Whether input 4 is added (+) or subtracted (−). | sign_4 |
| Sign 5 | Choice: + / − | + | — | Whether input 5 is added (+) or subtracted (−). | sign_5 |