Selected Summer (SSUM)

This information applies to the
CompactLogix
5370,
ControlLogix
5570,
Compact GuardLogix
5370,
GuardLogix
5570,
Compact GuardLogix
5380,
CompactLogix
5380,
CompactLogix
5480,
ControlLogix
5580, and
GuardLogix
5580 controllers.
The Selected Summer (SSUM) instruction uses Boolean inputs to select real inputs to be algebraically summed.
Available Languages
Ladder Diagram
This instruction is not available in ladder diagram logic.
Function Block
SSUM_FBD_avail_v31
Structured Text
SSUM(SSUM_tag);
Operands
Function Block
Operand
Type
Format
Description
SSUM tag
SELECTED_SUMMER
Structure
SSUM structure
SELECTABLE_SUMMER Structure
Input Parameter
Data Type
Description
EnableIn
BOOL
Enable input. If false, the instruction does not execute and outputs are not updated.
Default is true.
In1
REAL
The first input to be summed.
Valid = any float
Default = 0.0
Gain1
REAL
Gain for the first input.
Valid = any float
Default = 1.0
Select1
BOOL
Selector signal for the first input.
Default is false.
In2
REAL
The second input to be summed.
Valid = any float
Default = 0.0
Gain2
REAL
Gain for the second input.
Valid = any float
Default = 1.0
Select2
BOOL
Selector signal for the second input.
Default is false.
In3
REAL
The third input to be summed.
Valid = any float
Default = 0.0
Gain3
REAL
Gain for the third input.
Valid = any float
Default = 1.0
Select3
BOOL
Selector signal for the third input.
Default is false.
In4
REAL
The fourth input to be summed.
Valid = any float
Default = 0.0
Gain4
REAL
Gain for the fourth input.
Valid = any float
Default = 1.0
Select4
BOOL
Selector signal for the fourth input.
Default is false.
In5
REAL
The fifth input to be summed.
Valid = any float
Default = 0.0
Gain5
REAL
Gain for the fifth input.
Valid = any float
Default = 1.0
Select5
BOOL
Selector signal for the fifth input.
Default is false.
In6
REAL
The sixth input to be summed.
Valid = any float
Default = 0.0
Gain6
REAL
Gain for the sixth input.
Valid = any float
Default = 1.0
Select6
BOOL
Selector signal for the sixth input.
Default is false.
In7
REAL
The seventh input to be summed.
Valid = any float
Default = 0.0
Gain7
REAL
Gain for the seventh input.
Valid = any float
Default = 1.0
Select7
BOOL
Selector signal for the seventh input.
Default is false.
In8
REAL
The eighth input to be summed.
Valid = any float
Default = 0.0
Gain8
REAL
Gain for the eighth input.
Valid = any float
Default = 1.0
Select8
BOOL
Selector signal for the eighth input.
Default is false.
Bias
REAL
Bias signal input. The instruction adds the Bias to the sum of the inputs.
Valid = any float
Default = 0.0
Output Parameter
Data Type
Description
EnableOut
BOOL
Indicates if instruction is enabled. Cleared to false if Out overflows.
Out
REAL
The calculated output of the algorithm.
Structured Text
Operand
Type
Format
Description
SSUM tag
SELECTED_SUMMER
Structure
SSUM structure
See Structured Text Syntax for more information on the syntax of expressions within structured text.
Description
The SSUM instruction operates as follows:
Condition
Action
No In is selected
Out = Bias
One or more In are selected
For all n where Selectn is true
Out = ∑ (In
n
x Gain
n
) + Bias
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See Common Attributes for operand-related faults.
Execution
Function Block
Condition/State
Action Taken
Prescan
EnableIn and EnableOut bits are cleared to false.
Tag.EnableIn is false
EnableIn and EnableOut bits are cleared to false.
Tag.EnableIn is true
EnableIn and EnableOut bits are set to true.
The instruction executes.
Instruction first run
N/A
Instruction first scan
N/A
Postscan
EnableIn and EnableOut bits are cleared to false.
Structured Text
Condition/State
Action Taken
Prescan
See Prescan in the Function Block table.
Normal Execution
See Tag.EnableIn is true in the Function Block table.
Postscan
See Postscan in the Function Block table.
Example
The values of select1 and select 2 determine whether to select analog_input1 and analog_input2, respectively. The instruction then adds the selected inputs and places the result in Out.
Function Block
SSUM_FBD_ex_v31
Structured Text
SSUM_01.In1 := analog_input1;
SSUM_01.Select1 := select1;
SSUM_01.In2 := analog_input2;
SSUM_01.Select2 := select2;
SSUM(SSUM_01);
selected_add := SSUM_01.Out;
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.