Engee documentation

Subsystem

The block for creating the hierarchy of the model.

blockType: SubSystem

Path in the library:

/Basic/Ports & Subsystems/Subsystem

Description

Block Subsystem contains a subset of the blocks inside the model or system. Block Subsystem It can represent a virtual subsystem or an atomic subsystem.

  • An atomic subsystem is a subsystem whose contents are interpreted as a single whole (atomic execution). Allows you to create conditionally executable subsystems: that is, those that are triggered only when a certain event occurs.

  • A virtual subsystem is a subsystem that is executed neither conditionally nor 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. The virtual subsystem serves solely to increase the readability of the model and does not affect its operation in any way.

To switch a virtual system to an atomic one, select the checkbox Treat as atomic unit.

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

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

Ports

Input

# In1 — signal input to the subsystem
scalar | vector | the matrix

Details

Block placement In1 the subsystem adds an external input port to the block Subsystem. The port label matches the block name. In1.

Use blocks In1 to receive signals from the local environment.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Complex numbers support

No

Output

# Out1 — the output signal from the subsystem
scalar | vector | the matrix

Details

Block placement Out1 the subsystem adds an output port from the block Subsystem. The port label matches the block name. Out1.

Use blocks Out1 to send signals to the local environment.

Data types

Float64

Complex numbers support

No

Parameters

Main

# Sample Time — the interval between the calculation steps
SampleTime (real number / vector of two real numbers)

Details

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

Default value

-1

Program usage name

SampleTime

Tunable

No

Evaluatable

Yes

# Treat as atomic unit — the ability to perform the subsystem as a single unit
Logical

Details

The subsystem can be considered as a single unit when determining the order of execution of blocks in the model.

  • If the checkbox is not checked, then all blocks in the subsystem are considered to be at the same level in the hierarchy of the model as the subsystem when determining the order of execution of blocks. This can lead to alternating execution of block methods in the subsystem with execution of block methods outside the subsystem.

  • If the check box is selected, then all blocks in the subsystem are considered as a single unit when determining the order of execution of blocks. For example, when it is necessary to calculate the output of a subsystem, 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 block. Subsystem.

Default value

false (switched off)

Program usage name

TreatAsAtomicUnit

Tunable

No

Evaluatable

No

Additional options

C code generation: Yes

Verilog code generation: Yes