Skip to main content
How to Configure a Model for Simulink® Real-Time™ search search close

To run a Simulink® model on a Speedgoat real-time target machine, you need to configure the model correctly for Simulink® Real-Time™. This can be done in multiple ways:

 

Applying the Changes Directly in the Model Settings
Using the Target Platform Selector (MATLAB® R2024a and later)
Using the slrealtime.Target Object (MATLAB® R2024a and later)
 

 

 

Applying the Changes Directly in the Model Settings

 

The simplest way to configure your model would be to use the Target Platform Selector; however, you can also go to the model settings and make the changes manually:

  • In Simulink, go to the MODELING tab and click Model Settings
  • Under SolverSolver selection, set Type to Fixed-step
  • Under Code GenerationTarget selection, set System target file to the correct value as listed in the table.

Additional valid system target file options may become available in the future.

MATLAB® Release System Target File
R2023b and earlier slrealtime.tlc
R2024a and later speedgoat.tlc

 

 

 

Using the Target Platform Selector

 

Info    Note: Available on MATLAB® R2024a and later.

The Target Platform Selector is a GUI application that you can use to configure your Simulink® model for the target platform, i.e., the Speedgoat real-time target machine.

You can open the Target Platform Selector by selecting Simulink® Real-Time™ in the APPS tab or Target Platform in the REAL-TIME tab.

Once the GUI is open, select the Speedgoat real-time target machine for which you want to configure your model and select OK.

Currently, the changes to the model settings are identical, no matter which Speedgoat real-time target machine has been selected. This may change in the future.

⮕ Documentation of the Target Platform Selector

Picturemodel-1

 

 

 

Using the slrealtime.Target Object

 

Info    Note: Available on MATLAB® R2024a and later.

You can configure your model for the target platform by calling the configureModelForTargetPlatform function from the slrealtime.Target object.


tg = slrealtime('TargetPC1');

tg.configureModelForTargetPlatform('myModel')

This function needs to access your Speedgoat real-time target machine and may fail if no connection can be established.
For more information, please visit the documentation at MathWorks®.

Follow Speedgoat LinkedIn