Key Features

A magnetic levitation control experiment. The model interfaces with external hardware using Analog Input and Analog Output blocks.

Simulink Desktop Real-Time enables you to run Simulink® models in real time and interface with physical devices. Using your Windows® or Mac OS X desktop or laptop, you can create and control a system for real-time simulation and testing applications, including rapid prototyping and hardware-in-the-loop (HIL) simulation, directly from Simulink.

Simulink Desktop Real-Time provides I/O device drivers that support an extensive selection of I/O boards, enabling you to interface with sensors, actuators, and other devices for developing, tuning, and testing real-time systems.

Simulink Desktop Real-Time includes a real-time kernel that runs at the highest priority on your operating system. This real-time kernel loads I/O device drivers and establishes a connection with Simulink. In normal mode, the I/O device drivers execute in real time, in parallel with a Simulink simulation. Simulink Desktop Real-Time synchronizes data between the real-time kernel and Simulink. You can achieve performance approaching 1 kHz in normal mode.

Simulink Coder generates C and C++ code from the model and the solver. Together with Simulink Coder, Simulink Desktop Real-Time creates a binary file of the model and solver using the included C compiler. The real-time kernel loads the resulting binary file and I/O device drivers, and establishes a connection with Simulink. In external mode, the model, solver, and I/O device drivers all execute in real time. You can achieve performance approaching 20 kHz in external mode.

With normal and external modes, you can control real-time model execution, data logging, parameter tuning, and signal viewing from the Simulink toolbar.

You can view dynamic systems as they run in real time using Simulink 3D Animation™.

Configuring stream input and stream output block parameters for a model. You can run the model in Simulink normal mode (shown) or Simulink external mode (by clicking the orange block).

Parameter Tuning, Signal Monitoring, and Data Acquisition

Tuning Parameters

You can tune model parameters while running Simulink in both normal and external modes by editing a Simulink block diagram. You can also add graphical controls, such as knobs and switches, to help tune model parameters. In external mode, the Simulink Desktop Real-Time communication link automatically transfers parameter changes in a Simulink block diagram to the executable running on the real-time kernel.

Monitoring and Capturing Signals in Real Time

Using Simulink Desktop Real-Time with Simulink, you can capture signals from the real-time model and display them with standard Simulink Scope blocks. You can view signals within the model using graphical displays, such as gauges, scopes, and lamps.

Acquiring and Logging Data

You can store run-time data in the MATLAB® workspace using Simulink. In external mode, you can capture one or more data bursts and save the data to a MATLAB file, which can be accessed in MATLAB for additional analysis and visualization.

Interacting with Models in Real Time

Using Simulink Desktop Real-Time and a joystick, you can interact in real time with a model such as a flight simulator or vehicle simulator. This approach enables you to verify system behavior before incorporating model components into more extensive HIL, motion-based, or full-scale fixed-simulator environments. Simulink Desktop Real-Time supports gameport joysticks and USB joysticks, including force-feedback models.

Synchronizing Models to Run in Real Time

By including the Real-Time Sync block in your design, you can synchronize your Simulink model, running in normal mode, with the real-time kernel. This synchronization enables the model to run in real time on your desktop or laptop without requiring fixed-step solvers. In addition, the real-time kernel synchronizes the model with available I/O devices, so you can feed real-time data into your Simulink model. In normal mode, you can achieve performance approaching 1 kHz.

Connecting Physical Devices

Simulink Desktop Real-Time includes a library of I/O driver blocks that provide connections between physical I/O devices and real-time models. You can run simulations to observe how Simulink models respond to real-world behavior. The I/O driver block library enables you to connect I/O signals to a wide variety of I/O boards.

Simulink Desktop Real-Time I/O driver blocks enable communication using either ASCII or binary data in any format. Supported communication protocols include UDP for standard network connections, RS-232 for serial lines, and CAN bus for controller area networks.

Thunderbolt™ is supported for connecting to I/O devices when using a Thunderbolt expansion chassis for PCIe/PCI boards or the Thunderbolt-capable HUMUSOFT® MF 644 multifunction I/O device. Thunderbolt is a common interface on Mac OS X laptops and desktops, and it is also available on select Windows laptops and desktops.

Available I/O driver blocks include:

  • Analog Input: Connect to and read analog input channels
  • Counter Input: Connect to and read counter input channels
  • Digital Input: Connect to and read digital input lines or channel
  • Encoder Input: Connect to and read encoder input channels
  • Other Input: Connect to and read from hardware sources requiring specialized driver support
  • Packet Input: Read unformatted binary data from port, file, or CAN device
  • Stream Input: Receives formatted ASCII data from port or file
  • Analog Output: Connect to and write analog output channels
  • Digital Output: Connect to and write digital output lines or channels
  • Frequency Output: Generate and output a pulse-width-modulated square wave to timer output
  • Other Output: Connect to and write to hardware sinks requiring specialized driver support
  • Packet Output: Write unformatted binary data to port, file or CAN Device
  • Stream Output: Write formatted ASCII data to port or file
  • Real-Time Sync: Synchronize Simulink to real-time kernel


Simulink Desktop Real-Time block library. The library enables you to connect I/O devices to Simulink signals in order to read inputs and write outputs.