Interact with a generated executable program while the program runs in nonreal time on your development computer by tuning a parameter and observing the results.
This part of the tutorial assumes that you have configured your copy of example
rtwdemo_secondOrderSystem as described in Configure Model for Verification.
To allow time for you to monitor changes that you make to the parameter,
set the simulation stop time to
Inf. In the Simulink® Editor, click the Hardware tab. Click the
down arrow to the right of Monitor & Tune. At the
bottom of the list enter
Inf for the simulation stop
Click Monitor & Tune. The software:
Builds the executable program.
Deploys the program as a separate process on your development computer.
Connects the Simulink model to the program.
Runs the model executable program code.
To stop the simulation, in the Hardware tab, click Stop.
Experiment with the value of a block parameter during execution. Observe the impact of the change.
While the executable program is simulating on your development computer, in the model canvas, use the Knob block to change the value of the damping gain. For example, change the value to 600. Observe:
The changes in the plot are displayed in the Dashboard Scope block.
In the Model Data Editor, the value for the Gain
parameter of the
Gain block changes. In the bottom-left corner of the
Simulink Editor, click the Model Data Editor
Next, package the generated program code and artifacts for deployment.