MoCustomBlock
The behavior of this block is user-defined in Modelica language.
Library
Activate/CustomBlocks
Description
The MoCustomBlock block provides a generic interface for specifying its properties and defining its simulation function. The simulation function is specified as a Modelica code and stored as a block parameter.
For more details, please refer to the section on Physical Component Modeling in the Extended Definitions for Advanced Users.Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
nin | Number of input ports | Number | ||
inports | Input ports | Structure | ||
inports/name | Name | Cell of strings | ||
inports/value | Initial value | Cell of scalars | ||
nout | Number of output ports | Number | ||
outports | Output ports | Structure | ||
outports/name | Name | Cell of strings |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
nparams | Number of parameters | Number | ||
params | Parameters | Structure | ||
params/name | Name | Cell of strings | ||
params/value | Value | Cell of scalars | ||
params/typ | Type | Cell of strings | 'Fixed' | |
nparamsvec | Number of vector parameters | Number | ||
paramsvec | Parameters | Structure | ||
paramsvec/name | Name | Cell of strings | ||
paramsvec/value | Value | Cell of vectors | ||
paramsvec/typ | Type | Cell of strings | 'Fixed' | |
nparamsmat | Number of matrix parameters | Number | ||
paramsmat | Parameters | Structure | ||
paramsmat/name | Name | Cell of strings | ||
paramsmat/value | Value | Cell of matrices | ||
paramsmat/typ | Type | Cell of strings | 'Fixed' |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
codename | Function name | String | ||
code | Function code | String | ||
nlibs | Number of external libraries | Number | ||
libs | Libs | Structure | ||
libs/path | Lib name | Cell of strings |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | explicit | output | nout | |
Port 2 | explicit | input | nin |