Bus for conserving connection lines
Simscape / Utilities
The Simscape Bus block bundles 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 the Simscape™ conserving connection lines only. It does not work with other types of connections, such as physical signal lines or Simscape Electrical™ Specialized Power Systems connection lines.
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 |
|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.
Bus— Simscape Bus port
Port connected to a Simscape Bus line, which represents a bundle of conserving connection lines. The bundle contains all the lines connected to the block on the opposite side.
This opposite side, by default, does not have ports. 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.
Hierarchy Strings— List of connection names
List of connection names corresponding to the conserving lines that are connected to the Simscape Bus block. By default, this list is empty. Every time you add a connection, a conserving port appears on the children side of the block. Use the or buttons in the block dialog box to add or remove connections.
You can also add and remove connections directly on the model canvas, as described in Working with the Block on Model Canvas.