Main Content

load

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

Description

example

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.

Examples

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.

slbuild('slrt_ex_osc');

Load the real-time application.

load(tg,'slrt_ex_osc');

Start the application.

start(tg);

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'

Introduced in R2020b