Documentation

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 it to run without interference at the selected sample rate. During real-time execution of your model, the kernel intervenes to give the model priority to use the CPU to execute each model update at the prescribed sample times. Once a model update completes, the kernel releases the CPU to run other operating system-based applications that might need servicing.

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 it to start running in the background each time you start your computer. The following procedure describes how to use the command sldrtkernel -install. (You can also use the command sldrtkernel -setup instead.) 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 making changes.

    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, do so before attempting to use the kernel, or your Simulink Desktop Real-Time model will not run.

  4. After installing the kernel, verify that it was installed by typing:

    rtwho

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

Once the kernel is installed, you can leave it installed. The kernel remains idle after you have installed it, which allows the operating system to control the execution of standard applications, such as Internet browsers, word processors, the MATLAB environment, and so on. The kernel becomes active when you begin execution of your model, and 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. Once uninstalled, the kernel is no longer active. The kernel executable file remains on your hard drive so that you can later reinstall it.

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 cancel uninstallation without making changes.

    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, verify 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 Host Computer Command Line

Uninstalling the MATLAB environment does not uninstall the Simulink Desktop Real-Time kernel. If you have uninstalled the MATLAB environment and need to uninstall the kernel, launch a DOS command shell and type:

sldrtkernel -uninstall

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

The Simulink Desktop Real-Time kernel uninstalled successfully.

This procedure works only with the Windows® operating system.

Was this topic helpful?