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.
If you have a Windows or Mac OS, Simulink Models can be run at a certain rate in Soft Real-Time.
To setup Simulink Desktop Real-Time, simply run the following command in the MATLAB Command Window:
For more information on how to set up Simulink Desktop Real-Time, see the following documentation:
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:
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
This example uses a Real-Time Synchronization block to run the model in soft real-time on a Windows OS.
- Simulink Desktop Real-Time Toolbox does not currently support Linux OS
- A Simulink model which uses a Real-Time Synchronization block cannot be deployed outside of MATLAB while maintaining the real-time execution of the model. The Real-Time Synchronization block is not supported.
- Simulink Desktop Real-Time's External Mode does not support the From Video Device block