User`s guide
3 Signals and Parameters
3-50
2 To reset to the previous values, type
setparam(tg,pt.parIndexVec,pt.OldValues)
ans =
parIndexVec: 5
OldValues: 800
NewValues: 100
Parameter Tuning with Simulink External Mode
You use Simulink external mode to connect your Simulink block diagram to
your target application. The block diagram becomes a graphical user interface
to your target application. You set up Simulink in external mode to establish a
communication channel between your Simulink block window and your target
application.
In Simulink external mode, wherever you change parameters in the Simulink
block diagram, Simulink downloads those parameters to the target application
while it is running. This feature lets you change parameters in your program
without rebuilding the Simulink model to create a new target application.
Note Opening a dialog box for a source block causes Simulink to pause.
While Simulink is paused, you can edit the parameter values. You must close
the dialog box to have the changes take effect and allow Simulink to continue.
After you download your target application to the target PC, you can connect
your Simulink model to the target application. This procedure uses the
Simulink model
xpcosc.mdl as an example, and assumes you have created and
downloaded the target application for that model.
1 In the Simulink window, and from the Simulation menu, click External.
A check mark appears next to the menu item
External, and Simulink
external mode is activated.