Download real-time application to target computer



target_object = load(target_object,real_time_application) loads the application real_time_application onto the target computer represented by target_object.

The call returns target_object, updated with the new state of the target.

The maximum file size for the real-time application (.mldatx) file is 4 GB. This file does not include portions of the file that can be stored on the development computer (for example, a supporting .dmr file). Simulink® Real-Time™ issues an error if the real-time application exceeds the maximum size or if the folder that contains the support files (/host) is not available.


collapse all

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

Get the target object.

tg = SimulinkRealTime.target('TargetPC1')
Simulink Real-Time Object

   Connected            = Yes
   Application          = loader

Load the real-time application.

load(tg, 'xpcosc')
Simulink Real-Time Object

   Connected            = Yes
   Application          = xpcosc
   Mode                 = Real-Time Single-Tasking
   Status               = stopped
   CPUOverload          = none

   ExecTime             = 0.0000
   SessionTime          = 918.5713
   StopTime             = 0.200000
   SampleTime           = 0.000250
   AvgTET               = NaN
   MinTET               = 9999999.000000
   MaxTET               = 0.000000
   ViewMode             = 0

   TimeLog              = Vector(0) 
   StateLog             = Matrix (0 x 2)
   OutputLog            = Matrix (0 x 2)
   TETLog               = Vector(0) 
   MaxLogSamples        = 16666
   NumLogWraps          = 0
   LogMode              = Normal

   Scopes               = No Scopes defined  
   NumSignals           = 7
   ShowSignals          = off

   NumParameters        = 7
   ShowParameters       = off

Start the application.


Input Arguments

collapse all

Object that represents the target computer. Before calling this function, make sure that you start the target computer with the Simulink Real-Time kernel and apply the required Ethernet link settings.

Example: tg

Name of the real-time application, without file extension. real_time_application can also contain the absolute path to the real-time application, without file extension.

Build the application in the working folder on the development computer. By default, after the Simulink Coder™ build process is complete, the Simulink Real-Time software calls SimulinkRealTime.target.load. If a real-time application was previously loaded, before downloading the new real-time application, SimulinkRealTime.target.load unloads the old real-time application.

If you are running the real-time application in Standalone mode, a call to SimulinkRealTime.target.load does nothing. To load a new application, rebuild the standalone application files with the new application and transfer the updated files to the target computer using SimulinkRealTime.fileSystem. Then, restart the target computer with the new standalone application.

Data Types: char | string

Introduced in R2014a