Main Content


Deploy to target and load real-time application to target computer



load(target_object,app_name) deploys and loads the application app_name onto the target computer represented by the target_object.

The load command checks whether Simulink® Real-Time™ software is connected to the RTOS on the target computer. If not connected, the load connects to the target computer before loading the real-time application.

You also can load the real-time application from the RTOS command line. For more information, see Execute Target Computer RTOS Commands at Target Computer Command Line and Target Computer Command-Line Interface.

If you are running the real-time application in standalone mode, instead of load, consider using the install function and the setStartupApp function. For more information about Simulink Real-Time modes, see Real-Time Application and Target Computer Modes.


collapse all

Load the real-time application slrt_ex_osc on the target computer TargetPC1, represented by target object tg. Start the application.

Get the target object, and then build the real-time application.

tg = slrealtime('TargetPC1');

Build the real-time application.


Load the real-time application.


If the real-time application MLDATX file is not located in your current folder, add path information to the load function. For example,

appPath = fileparts(which('slrt_ex_osc.mldatx'));
load(tg, [appPath '\' 'slrt_ex_osc']);

Start the application.


Input Arguments

collapse all

Provides access to methods that manipulate the target computer properties.

Example: tg

Provides name of real-time application MLDATX file that you built from the model.

Example: 'slrt_ex_osc'

Version History

Introduced in R2020b