Simulink Desktop Real-Time

This documentation shows how to use Simulink Desktop Real-Time to deploy Simulink models to a Windows or Mac Desktop Computer.

Contents

If you have a Windows or Mac OS, Simulink Models can be run at a certain rate in Soft Real-Time.

Setup

To setup Simulink Desktop Real-Time, simply run the following command in the MATLAB Command Window:

sldrtkernel -install

For more information on how to set up Simulink Desktop Real-Time, see the following documentation:

Install Real-Time Kernel

Normal vs. External Mode in Simulink Desktop Real-Time

There are two modes when using Simulink Desktop Real-Time. In Normal mode, the algorithms in the model run primarily in the Simulink Engine. The model builds quicker but has trouble running on a schedule. In External Mode, the algorithms in the model run entirely in the Windows Kernel. As a result, the model has the reverse advantage and disadvantage. Build times are longer but the algorithm has a much easier time running at the desired schedule.

To test this out, try the following demo:

Open Example

In normal mode, the model executes blocks in the Simulink Engine and passes data back and forth through a buffer to the Windows kernel.

In external mode, the model runs in the Windows kernel mode process. Telemetry and tuning commands are passed through to the Simulink Engine to display the results and interact with the code.

For more information on how this works, check out the following documentation for Normal and External Mode:


Simulink with Real-Time Synchronization Block

Open Example

This example uses a Real-Time Synchronization block to run the model in soft real-time on a Windows OS.


Limitations