Define components and Modelica blocks with the MoCustomComponent block.
The Modelica Custom Component block is available for defining an implicit component
with Modelica language. The block is fully customizable including its ports, parameters
and simulation function. The block lets you leverage any existing Modelica code to
create a new component or modify an existing Modelica block.
-
From the Palette Browser, select block. Drag and drop the block into your diagram and double-click
it.
The block dialog appears with tabs to define the Ports, Parameters and
SimFunction for the block.
-
On the Ports tab, enter the number of input and output
ports for the block, enter a name for each port, then click OK.
-
On the Parameters tab, enter the number of parameters
for the block. For each parameter, enter a name, value and type, and click
OK.
-
On the SimFunction tab, enter the simulation function for your block, then
click OK.