Main Content

loadExecutable

Load executable into real-time kernel

Since R2023b

Description

executableObj = loadExecutable(RT.Kernel,modelName) loads the specified executable name into the real-time kernel. Typically, an executable is created by loading the compiled model. It is unusual to load directly by calling RT.Executable or loadExecutable.

example

Examples

collapse all

This example shows how to load an executable in the real-time kernel.

Open the model, build the executable, and load the executable RXW64 (for Windows®) file. Other executable file extensions are RXM64 (for Mac) and RXL64 (for Linux®).

openExample('sldrtex_counter');
slbuild('sldrtex_counter');
myExecutable = loadExecutable(RT.Kernel,'sldrtex_counter.rxw64')
myExecutable = 

  Executable with properties:

      Parent: [1×1 RT.Kernel]
    CodeSize: 38373
    DataSize: 199800

Input Arguments

collapse all

The RT.Kernel argument specifies the real-time kernel object.

The modelName argument provides the name of the model for the simulation.

Example: 'sldrtex_counter'

Output Arguments

collapse all

The executableObj object represents the executable and provides timer information through object properties.

Version History

Introduced in R2023b