Verify Simulink Real-Time Configuration for Example Applications
R2026bFor this tutorial, you must have this configuration:
Simulink® Real-Time™ software installed on the MATLAB® development computer. See Install Development Computer Software
Speedgoat® target machine (target computer) connected to the development computer
Speedgoat I/O Blockset software installed on the development computer
Target computer connection configured for Simulink Real-Time. See Configure Target Computer Settings by Using Simulink Real-Time Explorer or Configure Target Computer Settings by Using MATLAB Language.
Use the following steps to verify that your development computer and target computer are connected and can run the Simulink Real-Time examples.
Connect to Target Computer
Verify that Simulink
Real-Time is installed by creating a Target object. Verify that the development computer can connect to the
target computer.
Start the target computer.
The target computer displays status monitor.
Connect to the target computer. In the MATLAB Command Window, type:
tg = slrealtime; connect(tg);
Create Simulink Real-Time Model
Verify that you can create a Simulink Real-Time model from the model template.
Create a Simulink model from the
simulinkstart page, in the MATLAB Command Window, type:simulink
Select the Simulink Real-Time template from the start page and create the Simulink Real-Time model,
my_slrt_model.
Build Real-Time Application from Model
Verify that you can configure the model for target computer tg
and build the real-time application MLDATX file from the model. In the MATLAB Command Window, type:
model = 'my_slrt_model'; modelSTF = getSTFName(tg); set_param(model,"SystemTargetFile",modelSTF); slbuild(model);
Load Real-Time Application on Target Computer and Run
Verify that you can load, start, and stop the real-time application. Check the status for each of these operations by observing the status monitor on the target computer.
load(tg,model); start(tg); stop(tg);
Explore Simulink Real-Time Examples
With your Simulink Real-Time installation verified and connection to your target computer verified, you are ready to explore the Simulink Real-Time examples. From the Simulink Real-Time landing page, click the Examples link in the top navigation bar.