MoCustomBlock

The behavior of this block is user-defined in Modelica language.

    MoCustomBlock

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

MoCustomBlock_0

NameLabelDescriptionData TypeValid 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

MoCustomBlock_1

NameLabelDescriptionData TypeValid 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'
'Fixed
only
at
initialization'
'Variable'

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'
'Fixed
only
at
initialization'
'Variable'

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'
'Fixed
only
at
initialization'
'Variable'

MoCustomBlock_2

NameLabelDescriptionData TypeValid 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

NameTypeDescriptionIO TypeNumber

Port 1

explicit

output

nout

Port 2

explicit

input

nin