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 Connected IO mode or accelerator mode, Simulink® transfers the new values to the model that is being simulated. In Run in Kernel 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. To open this model, in the MATLAB® Command Window, type:
This model opens in Connected IO mode.
First, install the Simulink
Desktop Real-Time™ kernel and
cd to a working folder.
Open the Scope block.
In Simulink Editor, on the Desktop Real-Time tab, select Mode > Run in Kernel.
On the Desktop Real-Time tab, select Run in Real Time > Stop Time and change the Stop Time to
On the Desktop Real-Time tab, click Run in Real Time. Simulink builds the real-time application, connects to the real-time kernel, and starts running the real-time simulation.
Open the Transfer Fcn block parameters dialog box.
Change Denominator coefficients to
[1 180 10000].
On the Desktop Real-Time tab, click Stop.