Documentation

Install Real-Time Kernel

The Real-Time Windows Target™ software requires a real-time kernel that interfaces with the Windows® operating system. The Real-Time Windows Target 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 Windows based applications that might need servicing.

Install the Kernel Using MATLAB

You must install the kernel before you can run a Real-Time Windows Target application. During software installation, the Real-Time Windows Target software is copied onto your hard drive, but the Real-Time Windows Target 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 rtwintgt -install. (You can also use the command rtwintgt -setup instead.) To install the kernel:

  1. In the MATLAB® Command Window, type:

    rtwintgt -install

    The MATLAB Command Window displays one of these messages:

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

    or:

    There is a different version of the Real-Time Windows Target 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 Real-Time Windows Target 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 Real-Time Windows Target 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 Windows operating system to control the execution of standard Windows based 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 Real-Time Windows Target 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:

    rtwintgt -uninstall

    The MATLAB Command Window displays the message:

    You are going to uninstall the Real-Time Windows Target 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 Real-Time Windows Target kernel has been successfully uninstalled.
  3. After uninstalling the kernel, verify that it was uninstalled. Type:

    rtwho

    The MATLAB Command Window displays the message:

    Real-Time Windows Target installation is not complete.
    Please type 'rtwintgt -setup' to complete the installation.
    Type 'help rtwintgt' for more information.

Uninstall the Kernel Using Host Computer Command Line

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

rtwintgt -uninstall

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

The Real-Time Windows Target kernel uninstalled successfully.
Was this topic helpful?