| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Real-Time Windows Target |
| Contents | Index |
| Learn more about Real-Time Windows Target |
| On this page… |
|---|
The Real-Time Windows Target software includes 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 when needed to ensure that the model is given 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 any other Windows based application that might need servicing.
During software installation, all 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. You must install the kernel before you can run a Real-Time Windows Target application. 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:
In the MATLAB Command Window, type:
rtwintgt -install
or:
Click the MATLAB Start button.
Select Links and Targets > Real-Time Windows Target > Install real-time kernel
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] :
Type y to continue installing the kernel, or n to cancel installation without making any 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.
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 correctly.
After installing the kernel, verify that it was correctly installed by typing:
rtwho
The MATLAB Command Window should display a message that shows the kernel version number, followed by performance, timeslice, 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 any standard Windows based application, including 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.
If you encounter any problems with Real-Time Windows Target software, you can uninstall the kernel. Once uninstalled, the kernel is no longer active and has no impact on the operation of your computer. The kernel executable file remains on your hard drive so that you can later reinstall it. To uninstall the kernel:
In the MATLAB Command Window or a DOS window, type:
rtwintgt -uninstall
or:
Click the MATLAB Start button.
Select Links and Targets > Real-Time Windows Target > Uninstall real-time kernel
The MATLAB Command Window displays the message:
You are going to uninstall the Real-Time Windows Target kernel. Do you want to proceed? [y]:
Type y to continue uninstalling the kernel, or n to cancel uninstallation without making any 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.
After uninstalling the kernel, verify that it was correctly uninstalled: Type:
rtwho
The MATLAB environment should display the following message.

If the uninstallation fails, see Forcibly Uninstalling the Kernel .
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 kernel should then uninstall from your system. If the uninstallation fails, see Forcibly Uninstalling the Kernel .
If you cannot uninstall the kernel with rtwintgt -uninstall, something has corrupted the Real-Time Windows Target kernel service. To uninstall the kernel:
In the MATLAB Command Window or a DOS command shell, type:
rtwintgt -forceuninstall
The command forcibly deregisters the kernel from the operating system without deleting any files.
Restart the computer before attempting any other action, including reinstalling the kernel.
Use rtwintgt -forceuninstall only when all other attempts to uninstall the kernel fail. The command leaves the computer in an inconsistent state that cannot be relied on and does not post relevant error messages.
Note Never execute rtwintgt -forceuninstall without immediately rebooting, after which you can reinstall the Real-Time Windows Target kernel as described in Installing the Kernel. |
![]() | Initial Working Directory | Testing the Installation | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |