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.
On the Modeling tab, under Design, click Model 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
increment_input interfaces 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
limits indicate 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.
On the Modeling tab, click Update Model.
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 during
int32 (signed 32-bit
(2) (a 1-D Simulink representation of a scalar)
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, on the Debug tab, select Information Overlays > 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, in the Simulation tab, click 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 (on the Modeling tab, click Model Data Editor). For information about the Model Data Editor, see Configure Data Properties by Using the Model Data Editor.