Connect Expandable Connectors
You can connect an expandable connector to another connector.
-
Create a behavior diagram containing at least one expandable
connector.
For this scenario, use 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.)
-
Drag from a connector.
Tip: To display the connectors´name in the diagram layer, from the Diagram section of the action bar, click Show Connector Names . A connection line appears and follows the cursor.
Tip: For possible actions when drawing the connection line, see Step 2 in Use Direct Connection. -
Select the connector with which you want to create a connection.
Tip: If you click anywhere on a component, the closest compatible connector for connection is selected. The Connection dialog box is displayed. -
To create a connection between nodes in the connector trees, in the
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.
-
To create a connection between a node and a variable in the
connector trees:
- In the Connection dialog box, select the node from the appropriate tree.
- In the dialog box, select the library that contains the variable. If necessary, use Search to locate and load a library.
- Click + next to a node to expand the list of available variables.
- Either select a variable, or click <Add variable> and then enter your variable name in the connect statement.
The node and variable you select are displayed in the connect statement. -
To include a label on the connection in the diagram, select the
Label connection to bus connector check box.
-
When finished, click
OK.
- The connection is created.
- The Connection dialog box closes.