User`s guide
3 Working with Real-Time Workshop
3-48
Click Close, and then close the External Mode Control Panel.
For information on the options mentioned above, see “External Signal
Uploading and Triggering” in the Real-Time Workshop User’s Guide
documentation.
5 To run the target program, you must open a command prompt window (on
UNIX systems, an
Xterm window). At the command prompt, change to the
ext_mode_example directory that you created in step 1. The target
program is in this directory.
cd ext_mode_example
Next, type the following command
extmode_example -tf inf -w
and press Return.
Note On Windows platforms, you can also use the “bang” command (!) in
the MATLAB console (note that the trailing ampersand is required):
!extmode_example -tf inf -w &
The target program begins execution. Note that the target program is in a
wait state, so there is no activity in the command prompt window.
The
-tf switch overrides the stop time set for the model in Simulink. The
inf value directs the model to run indefinitely. The model code will run
until the target program receives a stop message from Simulink.
The
-w switch instructs the target program to enter a wait state until it
receives a
Start real-time code message from the host. This switch is
required if you want to view data from time step 0 of the target program
execution, or if you want to modify parameters before the target program
begins execution of model code.