Main Content

Install Real-Time Kernel

The Simulink® Desktop Real-Time™ software requires a real-time kernel that interfaces with the operating system. The Simulink Desktop Real-Time kernel assigns the highest priority of execution to your real-time executable, which allows the executable to run without interference at the selected sample rate. During real-time execution, the kernel intervenes to give the model priority to use the CPU to execute each model update at the prescribed sample times. After a model update completes, the kernel releases the CPU to run other operating system-based applications that need service.

Install the Kernel Using MATLAB

You must install the kernel before you can run a Simulink Desktop Real-Time application. During software installation, the Simulink Desktop Real-Time software is copied onto your hard drive, but the Simulink Desktop Real-Time kernel is not automatically installed into the operating system.

Installing the kernel configures the kernel to start running in the background each time you start your computer. The following procedure describes how to use the command sldrtkernel -install. Alternatively, you can use the command sldrtkernel -setup. To install the kernel:

  1. In the MATLAB® Command Window, type:

    sldrtkernel -install

    The MATLAB Command Window displays one of these messages:

    You are going to install the Simulink Desktop Real-Time kernel.
    Do you want to proceed? [y] :

    or:

    There is a different version of the Simulink Desktop Real-Time kernel installed.
    Do you want to update to the current version? [y] :
  2. Type y to continue installing the kernel, or n to cancel installation without changing the installation.

    If you type y, the MATLAB environment installs the kernel and displays the message:

    The Simulink Desktop Real-Time kernel has been successfully installed.
  3. If a message appears asking you to restart your computer, complete the restart before attempting to use the kernel, or your Simulink Desktop Real-Time model does not run.

  4. After installing the kernel, check the installation by typing:

    rtwho

    The MATLAB Command Window displays a message that shows the kernel version number, followed by timer, driver, and other information.

After the kernel is installed, the kernel remains idle. You can leave the kernel installed. While the kernel is idle, the operating system controls the execution of standard applications, such as Internet browsers, word processors, and the MATLAB environment. The kernel becomes active when you begin execution of your model, and the kernel becomes idle again after model execution completes.

Uninstall the Kernel

If you encounter problems with Simulink Desktop Real-Time software, you can uninstall the kernel. After the kernel is uninstalled, the kernel is no longer active. The kernel executable file remains on your hard drive so that you can later reinstall the kernel.

Uninstall the Kernel Using MATLAB

To uninstall the kernel from MATLAB:

  1. In the MATLAB Command Window, type:

    sldrtkernel -uninstall

    The MATLAB Command Window displays the message:

    You are going to uninstall the Simulink Desktop Real-Time kernel.
    Do you want to proceed? [y]: 
  2. Type y to continue uninstalling the kernel, or n to stop uninstalling without changing the installation.

    If you type y, the MATLAB environment uninstalls the kernel by removing it from memory, then displays the message:

    The Simulink Desktop Real-Time kernel has been successfully uninstalled.
  3. After uninstalling the kernel, check that it was uninstalled. Type:

    rtwho

    The MATLAB Command Window displays the message:

    Simulink Desktop Real-Time installation is not complete.
    Please type 'sldrtkernel -setup' to complete the installation.
    Type 'help sldrtkernel' for more information.

Uninstall the Kernel Using Development Computer Command Line

Uninstalling the MATLAB environment does not uninstall the Simulink Desktop Real-Time kernel. If you uninstalled the MATLAB environment without uninstalling the kernel, open a development computer command window and type:

sldrtkernel -uninstall

The sldrtkernel program uninstalls the kernel by removing the kernel from memory, then the program displays the message:

The Simulink Desktop Real-Time kernel uninstalled successfully.

This procedure works only with the Windows® operating system.

See Also