Tune Block Parameters by Using the Block Dialog Box

After running your real-time application, use the block mask dialog box or Property Inspector to change parameter values and observe the changes to the signals. In normal or accelerator mode, Simulink® transfers the new values to the model that is being simulated. In external mode, Simulink transfers the new values to the real-time application that is running in the kernel mode process.

For this example, your goal is to minimize ringing in the transfer function.

This procedure begins with the square-wave transfer function model sldrtex_model (matlab: open_system(docpath(fullfile(docroot, 'toolbox', 'sldrt', 'examples', 'sldrtex_model')))). This model opens in normal mode.

First, install the Simulink Desktop Real-Time™ kernel and cd to a working folder.

  1. Open sldrtex_model.

  2. Open the Scope block.

  3. In Simulink Editor, on the Desktop Real-Time tab, select Run in Real Time > Stop Time and change the Stop Time to Inf.

  4. On the Desktop Real-Time tab, click Run in Real Time. Simulink builds the real-time application, selects external mode simulation, connects to the real-time kernel, and starts running the real-time simulation.

  5. Open the Transfer Fcn block parameters dialog box.

  6. Change Denominator coefficients to [1 180 10000].

  7. Click Apply.

  8. On the Desktop Real-Time tab, click Stop.

Related Topics