Prev Next

Creating Modelica-Specific Blocks

Given the broad range of different part-types that can be used in Modelica, there will be cases where you need to model Modelica components and parts that you cannot derive from the basic Blocks supplied in the SysPhS Component patterns. In such cases you set an Enterprise Architect component to reference the Modelica component.

Using the Modelica Class Path for a Block

The process to reference a Modelica component in an Enterprise Architect SysPhS component is to:

  • In Modelica, access the Modelica component's Class Path
  • Copy this text
  • In Enterprise Architect, paste the copied text into the Modelica Block's 'Name' field

This illustration is an example of a Modelica component (a JK Flip-Flop) and its 'Parameters' dialog, showing the Class-Path.

  • Note: The Class-Path can be selected by clicking and dragging the cursor across the path, then pressing Ctrl+C on the block of text.

Place the copied text inside the Properties window for the SysPhS Modelica Block, in the 'Name' field under ModelicaBlock ( from SysPhS ):.

Setting the SysPhS Ports

Ports on a Block can be non-typed Ports or predefined Port types.

Non-typed Ports are created by dragging a Modelica Port from the Toolbox onto a diagram.

To reference the SysPhS predefined Port types - such as a boolean signal input Port or an analogue signal output Port:

  • Access the Port types in the SysPhS Platform Independant Component Library in the Browser window
  • Drag a Port-type from the Library onto a Block on a diagram
  • Set it as a Port on the Block

For example, this illustration shows the 'j' and 'k' Ports being created on the Flip-Flop, with the 'j' Port set and the 'k' Port in the process of being defined as a Port.

Learn more