Add Function Block

The Add function block get (summarizes) input A through H. In H can be either standard input or a parameter In H Par. In addition, there is a parameter called Ignore Inv In. The Master Sync Enabled function can be activated for parameters. The "No Of Inputs" is the the amount of inputs that are considered for the output calculation.

Figure 1: Add - Wire Sheet

Figure 2: Add - Property Sheet

Inputs must be valid to get considered for the calculation of the output. Valid values can be positive or negative. Inputs with "null" or "0.00" are ignored and not considered in the calculation. Inputs that are not connected have the value "null" and are ignored during the calculation (depending on Ignore Inv In).

NOTE: Parameter values are only visible in the Property Sheet, but not in Function Block view.

Figure 3: Add Logic Diagram

Input

Input Name

Description

In A-In H

This input slot is of type Numeric.

In H

(In & Par)

This input slot is of type Numeric. Since In H is also available as a parameter, the slot is hidden by default. This allows you to add a constant without using another function block.

Table 1:Inputs of Add Function

Output

Output Name

Description

Out

Outputs the sum of inputs A through H depending on the parameters. If all inputs have the value "null", then the following applies:

- "0.00", if Ignore Inv In is set to "true"

- "null", if Ignore Inv In is set to "false"

No of Inputs

Outputs the amount of inputs that are considered for the calculation of Out. If Out has the value "null", then No of Inputs also becomes "null", since no calculation is performed.

Table 2: Outputs of Add Function


 

Parameter

Parameter Name

Description

In H Par

(In & Par)

If In H is "null", then In H Par is used for the calculation. Default is "nan".

Ignore Inv In

True means that only inputs with a value not equal to "null" are considered.

"false" means that as soon as an input has a value of "null", the output Out is set to "null".

Default is "true".

Out Save

Master Sync Enabled: If you set it to "true" the last output will be set as output for one cycle after the controller restarts. The application can use it to return to the same state before the controller restart

Out: To enable or disable the Out feature.

Table 3: Parameters of Add Function

Example

1.       Ignore Inv In is "false"

Figure 4: Add Example with Ignore Inv In = "false"

Out is "null" because one of the inputs is "null". No of Inputs is "null", because Out is "null".

2.       Ignore Inv In is "true"

Figure 5: Add Example with Ignore Inv In = "true"

Number of inputs = 3, because only valid inputs are summarized. Out is 6, because In B is ignored because of the "null" value. Thus, the addition looks as following: Out = In A + In C + In D = 5 + 3 - 2 = 6.

In D - In H are not connected and therefore they are ignored. In H Par has the value "nan" and therefore it is also ignored.

Refer to General Description for general information about IRMN4 Function Blocks.