User`s guide
Getting Started with External Mode Using grt
4-9
Running External Mode on Your Target
To run external mode, you must open an MS-DOS command prompt (on UNIX
systems, an Xterm window). At the MS-DOS command prompt, type
modelname -tf 0
and the model that you’ve created will execute. The -tf switch overrides the
stop time set for the model in Simulink. The
0 value directs the model to run
indefinitely. Under the
Simulation menu of your model, select Connect to
target
. You should see your output signals A and B on the two scopes in your
model. You may have to adjust the parameters of your scopes to fit your signal,
depending on what values you selected for
A and B.WithA=2 and B=3,the
output looks like this:
You can change signals on-the-fly by opening the dialog boxes for the Gain
blocks in the model and entering a new numerical value for the gain or by
setting the gain value in the MATLAB workspace. In the latter case, you must
type
Crtl-D or select Update Diagram under the Edit menu of your model
after changing the value of the MATLAB variable. Changing parameters in
your model in this fashion is called downloading.
The following sections discuss the options available for external mode.