Bus for conserving connection lines
Simscape / Utilities
The Simscape Bus block bundles conserving connections into a Simscape Bus line. You can also use this block to access one or more connections from an existing Simscape Bus line. Physical connection lines are nondirectional, therefore, the block can serve as both a bus creator and a bus selector. Typically, a model would have two Simscape Bus blocks, facing each other, with their bus ports connected.
However, a model can also contain a hierarchy of Simscape Bus blocks.
Conserving connections bundled into a Simscape Bus line can belong to different domains.
The block bundles only the Simscape™ conserving connections, that is, nondirectional connection lines between Simscape conserving ports or Simscape Multibody™ ports. It does not work with other types of connections, such as physical signal lines or Simscape Electrical™ Specialized Power Systems connection lines. For more information on conserving connections, see Physical Conserving Ports.
The Simscape Bus block can have ports on two sides:
Parent (bundle) side, indicated by the black ribbon. This side contains a single bus port, which bundles all the connections coming into the block on the children side.
Children (elements) side, opposite the parent side. This side does not have any ports by default. You add ports by dragging the connection lines to that side of the block, or by using the block dialog box. Elements coming into the block on the children side can be either conserving connection lines or Simscape Bus lines. Every time you add a port on the children side, the corresponding connection is added to the connections list inside the block.
The names of the connections are shown on the block icon, next to the corresponding ports on the children side, and in the Hierarchy Strings list in the block dialog box. You can edit these names in the dialog box or directly on the icon, if needed, by clicking and typing a new name.
The block dialog box contains these buttons:
![]() | Add a new connection name to the Hierarchy Strings list. The
default connection names are Connection1 ,
Connection2 , and so on. You can edit these names, as needed, by
selecting a row, then clicking it again and typing the new name. When you add a
connection using this button, a round conserving port appears on the children side of
the block, similar to that of a Connection Port block.
The domain type of this conserving port is defined once you connect it to a conserving
port on another block. After that, you can connect only the same type of port to the
corresponding connection on the second bus. You can also add connections directly on
the canvas, by dragging a connection line from a conserving port on another block to
the children side of the Simscape Bus block. |
![]() | Delete the selected connection from the Hierarchy Strings list. For unconnected ports, you can also delete them or edit their names directly on the canvas. |
![]() | Refresh the Hierarchy Strings list after adding or removing connections on the canvas. |
To add connections to a Simscape Bus block:
Select a conserving port on another block. Or, to create a hierarchy of Simscape Bus blocks, select a bus port on the parent side of another Simscape Bus block.
Drag a connection line from the selected port to the children side of the first Simscape Bus block.
A new connection with the default name is automatically added to the block connection list. You can edit the connection name, as needed, in the upper blue field. When done editing, select the connection name in the lower blue field to create the connection.
When you delete a connection line, the corresponding port on the children side of the block is not deleted. You can reuse it by connecting another block.
To delete unused ports:
Select a round conserving port on the children side of a Simscape Bus block. Make sure to select just the port, not the whole block.
From the ellipsis menu, select Delete Port. Deleting a port also deletes the corresponding name in the block connection list.