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. 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™.
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.
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.
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.
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.
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.
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: