+   Addition

Operator - Performs an addition of all inputs.

Inputs

IN1 : ANY   First input
IN2 : ANY   Second input

Outputs

Q : ANY     Result: IN1 + IN2

Remarks

All inputs and the output must have the same type. In FBDClosed "Function block diagram" A function block diagram describes a function between input variables and output variables. A function is described as a set of elementary blocks language, the block can have up to 16 inputs. In FFLD language, the input rung (EN) enables the operation, and the output rung keeps the same value as the input rung. In ILClosed "Instruction list" This is a low-level language and resembles assembly language, the ADD instruction performs an addition between the current result and the operand. The current result and the operand must have the same type.

The addition can be used with strings. The result is the concatenation of the input strings.

ST Language

Q := IN1 + IN2;
MyString := 'He' + 'll ' + 'o';   (* MyString is equal to 'Hello' *)

FBD Language

(* the block can have up to 16 inputs *)

FFLD Language

(* The addition is executed only if EN is TRUE *)
(* ENO is equal to EN *)

IL Language

Op1: FFLD  IN1
     ADD IN2
     ST  Q    (* Q is equal to: IN1 + IN2 *)
Op2: FFLD  IN1
     ADD IN2
     ADD IN3
     ST  Q    (* Q is equal to: IN1 + IN2 + IN3 *)

See also

-   *   /