Build and Download Real-Time Application by Using Run on Target
The example model is a real-time model of a damped oscillator,
slrt_ex_osc_rt
. To open the model, in the MATLAB® Command Window, type:
openExample('slrealtime/SlrtCreateAndRunRealTimeAppFromSimulinkModelExample', ... 'supportingFile','slrt_ex_osc_rt.slx')
To generate C code, compile, link, and download the real-time application to the target computer, use the Simulink® Real-Time™ build process available from the Simulink Editor Real-Time tab.
After you enter changes in the Configuration Parameters dialog box, you can build the real-time application. For information about real-time application options, see Simulink Real-Time Options Pane.
Open the
slrt_ex_osc_rt
model.MATLAB loads the oscillator model and displays the Simulink block diagram.
In the Simulink Editor, from the targets list on the Real-Time tab, select the target computer on which to run the real-time application.
Click Run on Target.
On the development computer, in the Diagnostics Viewer, you can view the build status. On the Debug tab, click Diagnostics. If the software detects an error during build and download, see Troubleshooting in Simulink Real-Time.
If you have a monitor connected to your target computer, the status monitor screen displays information about the application name. For more information, see Target Computer Status Monitor. You can also observe the event status of a
Target
object by installing a listener for object events.