User`s guide
Parameter Tuning and Inlining Parameters
3-47
Parameter Tuning with MATLAB
You use the MATLAB functions to change block parameters. With these
functions you do not need to set Simulink to external mode, and you do not need
to connect Simulink with the target application.
You can download parameters to the target application while it is running or
between runs. This feature lets you change parameters in your target
application without rebuilding the Simulink model.
After you download a target application to the target PC, you can change block
parameters using xPC Target functions. This procedure uses the Simulink
model
xpcosc.mdl as an example, and assumes you have created and
downloaded the target application for that model. It also assumes that you
have assigned
tg to the appropriate target PC.
1 In the MATLAB window, type
+tg or tg.start or start(tg)
The target PC displays the following message.
System: execution started (sample time: 0.001000)
2 Display a list of parameters. Type either
set(tg,'ShowParameters','on') or tg.ShowParameters='on'
and then type
tg
The MATLAB window displays a list of properties for the target object.
ShowParameters = on