Skip to content

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 ​

PortKindSignalNotes
in_1Control inputInteger
in_2Control inputInteger
in_3Control inputIntegerShown when Inputs is at least 3
in_4Control inputIntegerShown when Inputs is at least 4
in_5Control inputIntegerShown when Inputs is at least 5
outControl outputInteger

Parameters ​

ParameterTypeDefaultUnitsDescriptionID
InputsChoice: 2 / 3 / 4 / 52—How many input ports the block has (2-5).num_inputs
Sign 1Choice: + / −+—Whether input 1 is added (+) or subtracted (−).sign_1
Sign 2Choice: + / −+—Whether input 2 is added (+) or subtracted (−).sign_2
Sign 3Choice: + / −+—Whether input 3 is added (+) or subtracted (−).sign_3
Sign 4Choice: + / −+—Whether input 4 is added (+) or subtracted (−).sign_4
Sign 5Choice: + / −+—Whether input 5 is added (+) or subtracted (−).sign_5

In the course ​