Connection Port
Physical Modeling connector port for subsystem
Libraries:
Simulink /
Signal Routing
Simscape /
Utilities
Powertrain Blockset /
Utilities /
Simscape
RF Blockset /
Equivalent Baseband /
Input
RF Blockset /
Circuit Envelope /
Utilities
Vehicle Dynamics Blockset /
Utilities /
Simscape
Description
The Connection Port block transfers a physical connection or signal across subsystem boundaries. Physical connections include Simscape™ conserving and physical signal connections, Simscape Multibody™ connections, and Vehicle Dynamics Blockset™ two-way connection ports, among others. This block is similar in function to the Inport and Outport blocks in the Simulink® library.
A subsystem needs a Connection Port block for each physical connection line that crosses its boundary. You can manually place a Connection Port block inside a subsystem, or Simulink can automatically insert a Connection Port block when you create a subsystem within an existing network.
Port Appearance on Subsystem Block
The Connection Port block adds a port to the parent Subsystem block. The port type depends on the connection or signal it transfers. The port appearance on the Subsystem block matches the port to which the Connection Port block connects inside the subsystem. For example, if the port transfers a Simscape conserving connection, then it appears on the Subsystem block as a Simscape conserving port.
Consider a subsystem with Simulink input and output ports labeled In and Out, respectively. If you place a Connection Port block inside this subsystem and leave it unconnected, the connection port on the parent Subsystem block appears as a white circle.
However, if you connect the Connection Port block to a Mass block, the appearance of the connection port on the parent Subsystem block changes to a conserving port.
The connection port becomes typed as mechanical translational, that is, you can connect only mechanical translational ports on other blocks to this subsystem port.
Port Naming and Location on Subsystem Block
Similar to the Simulink input and output ports, the connection port on the subsystem icon displays the port number instead of the block name when the port block has the default name. If you add a Connection Port block with default name and parameters to a subsystem, the connection port is labeled with the Port number parameter value and located on the left side of the parent Subsystem block icon.
To switch the port to display on the right side of the icon, change the Port
location on the parent subsystem parameter value to
Right
.
Flexible port placement in Simulink Editor lets you move ports by clicking and dragging the port along the block icon outline, and this way you can put ports on any side of a Subsystem block, including top and bottom. The Port location on the parent subsystem parameter does not have separate values for top or bottom. If you drag a port to a different location on the Subsystem block icon, the parameter value automatically changes to reflect the new placement:
Left
— The port appears on the left or top side of the subsystem icon.Right
— The port appears on the right or bottom side of the subsystem icon.
If there are multiple connection ports, the port index is automatically renumbered after each move, as necessary, to reflect the new port location. For example, if a Subsystem block has three connection ports, as shown, and you move port 2 to the bottom of the block icon, ports 2 and 3 are renumbered. The value of the Port number parameter of these two Connection Port blocks automatically changes to match the new port number.
The orientation of the parent Subsystem block can also affect the port location. For example, if you flip the parent Subsystem block, the connection port 1 appears on the opposite side to what its Port location on the parent subsystem parameter indicates.
Specifying Rigid Interfaces
You can lock down the connection type for the block port by applying a rigid interface
specification. For example, you can restrict the block to accept connections only from the
mechanical translational ports on other blocks. For a list of Foundation domain types, see
Domain-Specific Line Styles. If you apply a rigid interface using a ConnectionBus
object, the
Connection Port block can be connected only to a bus port of a
Simscape Bus block.
Use the Connection type parameter to specify a rigid interface,
such as a particular domain type or a ConnectionBus
object. When you apply
a rigid interface definition, the block appearance changes, as shown:
Flexible connection
Rigid domain connection
Rigid bus connection
To remove the rigid interface specification, set the Connection
type parameter to Inherit: auto
.
Examples
Ports
Conserving
Parameters
Extended Capabilities
Version History
Introduced in R2007a