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. InConnected IOmode or accelerator mode, Simulink®transfers the new values to the model that is being simulated. InRun in Kernelmode, 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 modelsldrtex_model
. To open this model, in the MATLAB Command Window, type:
open_system(docpath(fullfile(docroot,'toolbox',...'sldrt','examples','sldrtex_model')))
This model opens inConnected IOmode.
First, install theSimulink Desktop Real-Time™kernel andcd
to a working folder.
Open
sldrtex_model
.Open theScopeblock.
In Simulink Editor, on the桌面实时tab, selectMode>Run in Kernel.
On the桌面实时tab, selectRun in Real Time>停止Timeand change the停止Timeto
Inf
.On the桌面实时tab, clickRun in Real Time. Simulink builds the real-time application, connects to the real-time kernel, and starts running the real-time simulation.
Open theTransfer Fcnblock parameters dialog box.
ChangeDenominator coefficientsto
[1 180 10000]
.ClickApply.
On the桌面实时tab, click停止.