Create Signal Groups with Simulink Real-Time Explorer

When testing a complex model with many signals, you frequently must select signals for tracing or monitoring from multiple parts and levels of the model hierarchy. You can make this task easier by using Simulink® Real-Time™ Explorer to create a signal group and save it to disk.

This procedure uses the model xpcosc. You must have already completed the following setup:

  1. Open model xpcosc.

  2. Connect to the target computer. On the Real-Time tab, toggle the Disconnected indicator to Connected.

  3. Build and download the real-time application to the target computer. On the Real-Time tab, click Run on Target.

  4. Open Simulink Real-Time Explorer. On the Real-Time tab, click Prepare > SLRT Explorer.

To create a signal group:

  1. In the Applications pane, expand the real-time application node and right-click node Groupings.

  2. Click New Signal Group.

    The Add New Signal Group Item dialog box appears.

  3. In the Add New Signal Group Item dialog box, enter a name in the Name text box, for example signalgroup1.sig. In the Location text box, enter a folder for the group file.

  4. Click OK.

    A new signal group appears, along with its Signal Group workspace.

  5. In the Applications pane, expand the real-time application node and then expand node Model Hierarchy.

  6. Select the model node and then click the View Signals button  on the toolbar.

    The Signals workspace opens, showing a table of signals with properties and actions.

  7. In the Signals workspace, to add signal Signal Generator to signalgroup1.sig, drag signal Signal Generator to the signalgroup1.sig properties workspace.

  8. Add signal Integrator1 to signalgroup1.sig in the same way.

  9. Press Enter, and then click the Save button  on the toolbar.

    When you are monitoring a signal group, you can change the output format of the group by selecting one of the options in the Format column. SeeSignal Group Monitoring Formats.

Signals are defined within a particular real-time application. To open a signal group from the File > Open > Group menu, you must first select an application.

To remove signals from the signal group, select the signal items in the group list and click Delete Signals.

To remove the signal group, navigate to the signal group under Groupings > Signals, right-click the signal group, and click Remove.

To make both workspaces visible at the same time, drag one workspace tab down until the  icon appears in the middle of the dialog box. Continue to drag the workspace until the cursor reaches the required quadrant, and then release the mouse button.

To save your Simulink Real-Time Explorer layout, click File > Save Layout. In a later session, you can click File > Restore Layout to restore your layout.

Related Topics