Contenido principal

Verify Simulink Real-Time Configuration for Example Applications

R2026b

For this tutorial, you must have this configuration:

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.

  1. Start the target computer.

  2. The target computer displays status monitor.

  3. 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.

  1. Create a Simulink model from the simulink start page, in the MATLAB Command Window, type:

    simulink
  2. 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.

See Also

Topics