Create ports and change their properties

Creating Ports

By using the tool buttons Add Input Port and Add Output Port, you can switch to input / output port creation mode indicated by a special cursor. Click the tool button Select Tool or the right mouse to deactivate port creation mode. In port creation mode, every click on the model background will create a new input or output port of type anytype. Each port gets a unique name. You can change the properties later using the Property Editor window.

Port property editor plane

Changing Port Properties

You can use the property editor to change the port properties. With a click on a port, the Port Properties plane in the Property Editor window becomes active and the current properties of the selected port are shown. The properties in this plane are:

If you change the name, you have to take care that the name is unique for the model. The port name has to be a valid identifier, that is, it can contain letters, digits and the underscore but must start with a letter or an underscore.
Port Type
Defines the type of port. This property defines whether the port is input or output as well as whether it is a single or multiple porthole. Possible values are defined in the table Possible port type combinations. For modules and FSM primitives, the values input and output are available. For primitives, the values inmulti and outmulti are also possible.
Data Type
Defines the type of data objects (particles) consumed by the port. This value defines the data type as well as whether the port accepts scalar values or matrices. Please refer to the table Possible data type combinations for possible values.
Data Structure
If you selected the data type datastruct, you can use this property to define which composite data type the port should accept or emit. In all other cases this property is not shown. Use the button in the input field to open a dialog for selecting the composite data type.
The description is used for generating the hypertext documentation of the model component.
Defines an arbitrary annotion for custom purposes, which are only shown in the Property Editor. They can be separately edited for each model instance.
Token Number
This property is only available for primitive ports. It defines the number of particles consumed or produced by the primitive on this port. This property is only applicable to data flow domains such as the SDF domain.
Defines whether a port is visible or not. This attribute is normally used in conjunction with derived ports where a model component should hide a port that is derived from another model component.
Using this property you can define the text label of the port as it is shown on instances of the model component. If you do not define an instance label, the port is not labeled on instances.
Sets the alignment of the port within the model component. With the cursor in add input/output port mode the port will be positioned according to which  border you click on. The position of the port can be changed by altering the settings in the Property Editor.