Execute Real-Time Application with MATLAB Language
Run the real-time application by
using generated code to observe the real-time behavior of the model. This procedure uses
the Simulink® model
slrt_ex_osc_rt. To open the model, in the MATLAB
Command Window, type:
open_system(fullfile(matlabroot, 'toolbox', 'slrealtime', ... 'examples', 'slrt_ex_osc_rt'))
You must have already completed the steps in Prepare Real-Time Application by Using MATLAB Language. In the model, select the output signal and mark the signal for data logging with the Simulation Data Inspector.
This example uses functions in the MATLAB Command Window to start and stop the real-time
application. For more information,
Start the target computer.
The target computer displays session 1 (default) and the target computer status monitor.
Open the Simulation Data Inspector. In the MATLAB Command Window, type:
Start the real-time application. In the MATLAB Command Window, type:
Observe that the real-time application starts running on the target computer. The status monitor displays information as the real-time application executes. The Simulation Data Inspector displays signal data.
Stop the real-time application. In the Command Window, type:
To monitor the event status of the
Targetobject, install a listener for object events.
To view the status monitor from the development computer, you can use PuTTY to open an
SSH client and start the status monitor application
/usr/target/bin/statusmonitor on the target computer.
For more information, see Target Computer Status Monitor.