Ways to Connect
You can use three different basic connection modes when
connecting. On top of this, you can also connect using specific connect
features.
Connection Modes
You can use any of the three modes when connecting. You can use direct connection,
the connection starter, or a start connection command when connecting.
- Using Direct Connection
- Direct connection, that is, you connect by dragging from one connector to another, is the
default way of connecting. This way of connecting is assumed in the
tasks. To use the direct connection, an option must be active. For more
information about this setting, and an example, see Use Direct Connection.
- Using the Connection Starter
- To use the connection starter, an option must be activated. For more information about this
settings, and an example of using the connection starter, see Use the Connection Starter.
- Using the Start Connection Command
- You can always use the command
Start Connection to connect. For an
example of using the
Start Connection command, see
Use the Start Connection Command.
Specific Connect Features
You can use specific connect features in some cases.
- Smart Connect
- You can connect by smart connect in two ways:
- You can drag a component over a connector in such a way that a
connector of the component hits that connector. If they match, a
connection is created.
- You can drop a component on an existing connection line in such
a way that a connector of the component hits the connection
line. If the connector matches a connector of the connection
line, a connection is created between these connectors.
- You can connect a two-ports component by dropping it on a
corresponding existing connection line.
Note:
To use smart connect, an option must be active.
For more
information about this setting, and examples of smart connect, see Connecting with Smart Connect.
- Connecting from and to Connection Lines
- You can start a new connection from an existing connection line, and end a new connection on
an existing matching connection line. See Starting a Connection from an Existing Connection Line and Ending a Connection on an Existing Connection Line.
- Using the Connection Manager
- You can use the Connection Manager to:
- Display all connectors and connections in a model
- Create new connections
- Repair broken connections
- Delete connections
For more information, see Using the Connection Manager.
Connectors
There are several kinds of connectors and connections in Modelica.
For further details, see the Modelica Language Specification (available at www.modelica.org).
- Standard Connectors
- For connecting standard connectors. How to create a standard
connection is documented both using direct connection and using the connection
starter. See
Ways to Connect for
references to the two ways of connecting.
- Array of Connectors
- If one of the connectors in a connection is an array, you must
select one of the connectors in the array for the connection.
The array dimension can either be a number or a simple
parameter:
ConnType a [3];
parameter Real n = 2;
ConnType b[n];
An array of connectors can be connected to one or several
functional or logical ports.
See
Creating and Connecting an Array of Connectors.
- Expandable Connectors
- The connection of an expandable connector can be done to the
whole bus connector, to one of its subcomponents, or to a new subcomponent
added on the fly.
Components of expandable connectors are automatically treated as
connectors.
See
Connecting and Tracing Expandable Connectors.
- Nested Connectors
- A nested connector is a connector that contains subconnectors.
The connection can be either to the top connector or to one of the
subconnectors.
See
Creating a Connection to a Nested Connector.
- Stacked (Overlapping) Connectors
- If many connectors created from the same parent component exist,
these connectors can be displayed as only one connector, called a stacked
connector. For example, an FMU having many inputs and outputs is greatly
simplified in the diagram by this.
By default, the minimum number of such connectors to be
displayed as stacked is 10. To change the value, change
Minimal number to activate stacked
connectors in
, the
FMI tab.
For more information about connecting, see
Connecting Stacked Connectors.
Bus Modeling
It is possible to draw connections from a connector back to
itself. This allows signals on a bus to be rerouted.
Connecting to Functional or Logical Ports and Interfaces
You can edit a functional or logical behavior in the
Dymola Behavior Modeling
app.
The ports and interfaces of such a behavior can be connected to the ports and
interfaces of the corresponding function or logical behavior.
See
Creating a Connection to a Functional or Logical Port or Interface.
Ports and interfaces are synchronized from the
Functional & Logical Design
app.
See
Functional & Logical Design
User's Guide: Managing Behaviors in Functions and Logical Components: Working
with Dymola Behaviors and Context Behaviors: Synchronizing and Updating Ports
and Interfaces: Synchronizing the Mapping of Behavior Ports and
Interfaces.
Functional and logical ports and interfaces are located in the
PLMConnectors package, in the
Package Browser. The example below shows a logical
behavior:
Check of Connections
When a connection has been defined, the following checks are automatically
performed and the corresponding error messages appears:
Note:
If a model
singularity is caused by incorrect or missing connections, no additional diagnostic
is given.
- If there is more than one connection between the same connectors.
- If the connectors at each end of a connection are compatible.
The error message if the connectors are not compatible displays
the declarations of the connectors.
- If connections are set with multiple sources for the same casual
signal, or no source for a casual signal.
Note:
In some models, the missing equation for the input is provided
textually. Change these models to use source-blocks instead.
Improve Connection Line Drawing
You can improve the connection line drawing in a number of
ways.
The following features are available:
- Adding connection labels to, for example, handle hidden connections more easily
- Reroute connections while drawing to, for example, avoid connections going through
components
- Reorganize connection lines after drawing
- Cross-connection management, to make joins and gaps of connection
line crossings more visible
- Hide connection lines
For more information, see
Improving Connection Line Drawing.
Highlighting Connections
You can highlight connections by clicking them. This is useful
for investigating, for example, large models where many connections are used.
For more information, see
Highlighting Connections.
Finding Connections
From a selected connection line, you can search the connection
and the corresponding connected components. This is useful for investigating,
for example, large models where expandable connectors are used.
For more information, see
Finding Connections.
|