Main Content

Assign Interfaces to Ports

Associate a port with an interface using the Property Inspector. To open the Property Inspector, locate it in the toolstrip in the Design section drop down. To show the SensorData port properties, highlight the port in the model. Expand Interface, and select the sensordata interface in the Name drop-down menu.

Demonstrates the process in the property inspector for selecting the 'Name' under 'Interface'. The interface name selected, using the drop down menu, is called 'sensor data'.

You can select an interface in the model data dictionary (see Define Interfaces), or create an anonymous interface — an interface of unstructured data whose properties are valid for that port only. An anonymous interface does not have a structure, but does have prescribed properties such as Type and Dimensions. You can edit the properties of the anonymous interface in the Property Inspector.

Multiple ports, whether they are connected or not, can use the same interface definition. When you assign an interface to a port, it is automatically propagated to the connected ports, provided they do not already have assignments. To simplify batch assignments, select multiple ports, right-click the interface, and select Assign to Selected Port(s).

Highlight the ports that use an interface definition by clicking the interface name in the Interface Editor.

When the interface named 'sensor data' is selected in the interface editor, the ports that are associated with it are highlighted in purple in the model.

A source port and the destination port to which it connects may be defined by different interfaces. Such a connection can represent an intermediate point in design, where components from different sources come together. To connect components with different interfaces, use an Adapter block from the component palette.

Demonstrates using the left toolstrip to click and drag an adapter block into the model. The adapter block is inserted between the 'Sensor' component and the 'Motor' component along the connection between two ports called 'Motion Data'.

Change the number of input ports on an Adapter block the same way you add and remove component ports. For more information, see Ports.

Related Topics