Engee documentation

Merge

Combining multiple signals into a single signal.

merge

Description

The Merge block combines input signals into a single output signal. The output value at any time is equal to the last calculated output value of the preceding (control) blocks. The number of inputs is set by the Number of inputs parameter.

The Merge block is used to combine input signals that update at different times into a combined signal in which the interleaved values retain their individuality and time.

Recommendations for the use of the Merge unit

The following recommendations should be followed when using the Merge unit:

  • Always use conditionally executing subsystems without any intermediate blocks to control Merge blocks.

  • Make sure that only one of the preceding (control) conditionally executed subsystems is executed at any time step.

  • Ensure that all input signals have the same interval between calculation steps.

  • Do not branch the signal coming to the input of the Merge block.

  • Do not register the signal applied to the Merge block input.

For each Merge block input, the topmost non-virtual source must be a conditionally executed subsystem (not including the For Iterator subsystem ).

Ports

Input

Port_1 - first input signal
scalar | vector

The first input signal to be combined with other input signals.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Port_n - n-th input signal
scalar | vector

n-th input signal to be combined with other input signals.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool.

Output

Port_1 - output signal
scalar | vector

Output signal obtained from the combined input signals.

Data types: Float64.

Parameters

Number of inputs - number of input ports to combine
2 (by default) | ` integer number`

Number of input signals to merge. The block creates a port for each input signal.

  • 2 - one input port.

  • ` integer` - number of input ports.

Usage in program code

Block Parameter

Inputs

Values

<integer number>

By default

2

Initial output - initial value of the output signal
0 (by default) | scalar | vector | matrix

The initial value of the output signal.

Usage in program code

Block parameter

InitialOutput

Values

scalar | vector | matrix

By default

[ ]