Creating and Connecting Expandable Connectors

This section describes how to create an expandable connector and how to connect expandable connectors.

This task shows you how to:


Before you begin: Create a behavior representation, either a logical behavior or a behavior library.
Related Topics
About Connectors and Connection

Create an Expandable Connector

This section describes how to create an expandable connector.

  1. Select a connector from the Component Browser or from the diagram.

  2. Select Class Attributes from the Authoring toolbar.

    The Class Attributes dialog box appears.

  3. From the Class Type drop-down list, select Expandable connector.

  4. From the Extends area, select a class to be extended.

  5. Click OK to close the dialog box.

    Your connector is now an expandable connector.

Connect Expandable Connectors

This section describes how to connect an expandable connector to another connector.

  1. Create a behavior diagram containing at least one expandable connector.

    In this example we have used the following components from the Modelica Standard Library:

    • Modelica.Blocks.Examples.BusUsage_Utilities.Interfaces.ControlBus
    • Modelica.Blocks.Examples.BusUsage_Utilities.Interfaces.SubControlBus

    (Both of these components are expandable connectors.)



  2. Select a connector and then click Connection from the Balloon contextual toolbar or from the Authoring toolbar.

    A connection line appears and follows the cursor.

  3. Select the connector with which you want to create a connection.

    The Create Modelica Connection dialog box is displayed.

  4. To create a connection between nodes in the connector trees, in the central window of the Create Modelica Connection dialog box, select a node from the left hand tree and a node from the right hand tree.

    The nodes you select are displayed in the connect statement at the bottom of the dialog box.

    In this example a connection has been made between realSignal1 of controlBus and myRealSignal of subControlBus.



  5. To create a connection between a node and a variable in the connector trees:

    1. In the central window of the Create Modelica Connection dialog box, select the node from the appropriate tree.
    2. In the top window of the dialog box, select the library which contains the variable. If necessary use Search to locate and load a library.
    3. Click + next to a node to expand the list of available variables.
    4. Either select a variable, or click <Add variable> and then enter your variable name in the connect statement at the bottom of the dialog box.

    The node and variable you select are displayed in the connect statement.

  6. To include a label on the connection in the diagram, select the Label connection to bus connector check box.

  7. When finished, click OK.


    • The connection is created.
    • The Create Modelica Connection dialog box closes.