Create Parameter Groups with Simulink Real-Time Explorer

When testing a complex model composed of many reference models, you tune parameters from multiple parts and levels of the model. To do so, create a parameter group.

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 parameter group:

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

  2. Click New Parameter Group.

  3. In the Add New Parameter Group Item dialog box, enter a name in the Name text box (for example, ParamGroup1.par). In the Location text box, enter a folder for the group file.

  4. Click OK. A new parameter group appears, along with its Parameter Group workspace.

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

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

    The Parameters workspace opens, showing a table of parameters with properties and actions.

  7. In the Parameters workspace, to add parameter Amplitude to ParamGroup1.par, drag parameter Amplitude to the ParamGroup1.par properties workspace.

  8. Add parameter Frequency to ParamGroup1.par in the same way.

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

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

To remove parameters from the parameter group, select the parameter items in the group list and click Delete Parameters.

To remove the parameter group, navigate to the parameter group under Groupings > Parameters, right-click the parameter 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