In the Simulink® Editor, you can turn on and off the display of interfaces in a model. When you are building large, complex models, you can connect or add signal lines between blocks or buses that are at different levels. The interface view allows you to trace signals through the nested levels. This capability helps you to:
Identify inputs and outputs.
Trace signal lines and bus elements to sources and terminations.
Annotate signal characteristics such as data type, dimensions, and sample time.
View units associated with signals, where applicable.
When you build a model, transition block pairs such as Inport and Outport and From and Goto help you to simplify connections of the crossovers among many signal lines. The interface view enables you to trace the hand-off and receipt between such blocks by way of colored highlights.
This example shows how to use the display of model interfaces to examine, trace, and understand the flow of signals and buses. This model propagates bus signals into referenced models.
Open the model
The counter_bus_input port channels the data and saturation limits of the counter to count and sets the upper and lower limit values. The increment_bus_input port channels a bus signal to change the increment and reset the counter.
Select Display > Interface to enable the interface view.
Use the perspectives control in the lower-right corner of the model to toggle the display of interfaces.
The three bars next to the
indicate the bus input signals. The single bars indicate data lines,
such as counts per second, or command lines, such as reset, to start
a new counting sequence. The three bars next to
that bus signals are nested inside the COUNTER subsystem.
The path for the data appears in blue. The COUNTER subsystem is highlighted, indicating the path continues within it.
Double-click the COUNTER subsystem.
The continuation of the path for the data signal appears in blue.
Select Simulation > Update Diagram.
This model requires values from a parent model to simulate completely.
counter_signal interface displays these
signal attributes, which help you to synchronize signals between blocks
Data type: int32 (signed 32-bit integer)
Dimensions: (2) (a 1-D Simulink representation of a scalar)
Sample time: Ts:D1 (a discrete sample time of D1, which is the highest speed)
In addition, when you update the diagram with interfaces displayed, the model displays the color code for sample time at each interface. For example, this model displays a red bar at each interface to indicate a sample time of D1.
To display a legend of the meaning of sample time colors, select Display > Sample Time > Colors.
counter_signal output interface
to see the output of the bus outlined in blue, where the path ends.
If you want to print this diagram with the interfaces displayed, select File > Print > Print.
When signals in your model have units associated with them,
you see the units in the interface view. For example, in the model
the Metronome1 subsystem shows units for inputs and outputs of the
subsystem in the interface view.
To modify the attributes of the existing interface (such as signal names, data types, and dimensions), consider using the Model Data Editor (View > Model Data Editor). For information about the Model Data Editor, see Configure Data Properties by Using the Model Data Editor.