Engee documentation

Subsystem

Block for creating the model hierarchy.

subsystem block

Description

A Subsystem block contains a subset of blocks within a model or system. A Subsystem block can represent a virtual subsystem or a non-virtual subsystem.

  • A non-virtual subsystem is a subsystem whose contents are interpreted as a single entity (atomic execution). It allows you to create conditionally executable subsystems: i.e. subsystems that run only when a certain event occurs.

  • Virtual subsystem is a subsystem that is not executed either conditionally or atomically. When determining the order of execution, the blocks of such a subsystem are considered to be located at the same level as the subsystem itself. Virtual subsystem serves only to increase the readability of the model and does not affect its operation in any way.

To switch the virtual system to a non-virtual system, set the Treat as atomic unit parameter to true.

To create a subsystem, copy the Subsystem block from the Ports & Subsystems library into the model. Then add blocks to the subsystem by opening the Subsystem block and copying the blocks into it.

The number of input ports displayed on the Subsystem block icon corresponds to the number of In1 input port blocks in the subsystem. Similarly, the number of output ports drawn on the block icon corresponds to the number of Out1 blocks in the subsystem.

Ports

Input

In - signal input to the subsystem
scalar | vector | matrix

Placing the In1 block in a subsystem adds an external input port to the Subsystem block. The port label is the same as the block name In1.

Use In1 blocks to receive signals from the local environment.

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

Output

Out - output signal from the subsystem
scalar | vector | matrix

Placing the block Out1 in the subsystem adds the output port from the block Subsystem. The port label is the same as the block name Out1.

Use Out1 blocks to send signals to the local environment.

Data types: Float64.

Parameters

Sample time - interval between calculation steps
-1 (By default)

Interval between calculation steps (non-negative number). To inherit a calculation step, set this parameter to -1.

Treat as atomic unit - possibility to execute the subsystem as a single unit
` disabled (by default)` | ` enabled`.

Forces to consider the subsystem as a single unit when defining the order of execution of blocks in the model.

  • off - all blocks in the subsystem are treated as being at the same level in the model hierarchy as the subsystem when determining the order of block execution. This may lead to alternation of execution of block methods in the subsystem with execution of block methods outside the subsystem.

  • `included' - all blocks in the subsystem are treated as a whole when determining the order of block execution. For example, when the output of a subsystem needs to be calculated, the system calls the output methods of all blocks in the subsystem before calling the output methods of other blocks at the same level as the Subsystem block.

Additional options

C code generation: Yes