Using Simulink    

Working with Signal Groups

The Signal Builder block allows you to create interchangeable groups of signal sources and quickly switch the groups into and out of a model. Signal groups can greatly facilitate testing a model, especially when used in conjunction with Simulink assertion blocks and the optional Model Coverage Tool.

Creating a Signal Group Set

To create an interchangeable set of signal groups:

  1. Drag an instance of the Signal Builder block from the Simulink Sources library and drop it into your model.

  1. By default the block represents a single signal group containing a single signal source that outputs a square wave pulse.

  1. Use the block's signal editor (see The Signal Builder Dialog Box) to create additional signal groups, add signals to the signal groups, modify existing signals and signal groups, and select the signal group that the block outputs.
  2. Connect the output of the block to your diagram.
  1. The block displays an output port for each signal that the block can output.

You can create as many Signal Builder blocks as you like in a model, each representing a distinct set of interchangeable groups of signal sources. See Simulating with Signal Groups for information on using signal groups in a model.

The Signal Builder Dialog Box

The Signal Builder block's dialog box allows you to define the waveforms of the signals output by the block. You can specify any waveform that is piecewise linear.

To open the dialog box, double-click the block's icon. The Signal Builder dialog box appears.

The Signal Builder dialog box allows you to create and modify signal groups represented by a Signal Builder block. The Signal Builder dialog box includes the following controls.

Group Panes

Displays the set of interchangeable signal source groups represented by the block. The pane for each group displays an editable representation of the waveform of each signal that the group contains. The name of the group appears on the pane's tab. Only one pane is visible at a time. To display a group that is invisible, select the tab that contains its name. The block outputs the group of signals whose pane is currently visible.

Signal Axes

The signals appear on separate axes that share a common time range (see Signal Builder Time Range). This allows you to easily compare the relative timing of changes in each signal. The Signal Builder automatically scales the range of each axis to accommodate the signal that it displays. Use the Signal Builder's Axes menu to change the time (T) and amplitude (Y) ranges of the selected axis.

Signal List

Displays the names and visibility (see Editing Signals) of the signals that belong to the currently selected signal group. Clicking an entry in the list selects the signal. Double-clicking a signal's entry in the list hides or displays the signal's waveform on the group pane.

Selection Status Area

Displays the name of the currently selected signal and the index of the currently selected waveform segment or point.

Waveform Coordinates

Displays the coordinates of the currently selected waveform segment or point. You can change the coordinates by editing the displayed values (see Editing Waveforms).

Name

Name of the currently selected signal. You can change the name of a signal by editing this field (see Renaming a Signal).

Index

Index of the currently selected signal. The index indicates the output port at which the signal appears. An index of 1 indicates the topmost output port, 2 indicates the second port from the top, and so on. You can change the index of a signal by editing this field (see Changing a Signal's Index).

Help Area

Displays context-sensitive tips on using Signal Builder dialog box features.


  Displaying Signals Represented by Virtual Signals Editing Signal Groups