Real-Time Windows Target
Real-Time Windows Target enables you to run Simulink models in real time and interface with physical devices. Using your Windows PC, you can create and control a system for real-time testing applications, including rapid prototyping and hardware-in-the-loop (HIL) simulation, directly from Simulink.
Real-Time Windows Target 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, experimenting, and testing real-time systems.
Real-Time Windows Target includes a real-time engine that runs in Windows kernel mode. This real-time engine 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. Real-Time Windows Target synchronizes data between the real-time engine and Simulink. You can achieve performance exceeding 500 Hz in normal mode.
Simulink Coder generates C code from the model and the solver. This product creates a binary file using a C compiler, which is included with Real-Time Windows Target. The real-time engine 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 model execution, data logging, parameter tuning, signal viewing, and starting or stopping real-time execution from the Simulink toolbar.
You can view dynamic systems as they run in real time using Simulink 3D Animation™.
You can tune model parameters by editing a Simulink block diagram while running Simulink in both normal and external modes. In external mode, the Real-Time Windows Target communication link automatically transfers parameter changes in a Simulink block diagram to the real-time application.
Using Real-Time Windows Target with Simulink, you can capture signals from the real-time model and display them with standard Simulink Scope blocks. You do not need any additional Simulink blocks. You can view signals within the model using graphical displays implemented with Gauges Blockset™.
You can store run-time data in the MATLAB® workspace using Simulink. In external mode, you can capture one or a series of data bursts and save the data to a MAT-file. For additional analysis and visualization, you can access this data in MATLAB.
Using Real-Time Windows Target 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. Real-Time Windows Target 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 engine. This synchronization enables the model to run in real time without requiring hardware.
Real-Time Windows Target includes a library of I/O driver blocks that provide connections between physical I/O devices and real-time models. You can run HIL 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 range of I/O boards.
Real-Time Windows Target I/O driver blocks enable communication using either ASCII or binary data protocols of arbitrary format. Supported communication protocols include UDP for standard network connections, RS-232 for serial lines, and CAN for controller area networks.
Available I/O driver blocks include the following: