Real-Time Windows Target

Key Features

  • Real-time closed-loop execution of Simulink models on Microsoft Windows
  • Signal visualization and parameter tuning while model is running
  • Execution control directly from Simulink, creating a PC-in-the-loop prototyping environment
  • Real-time performance approaching 1 kHz in normal execution mode
  • Real-time performance approaching 20 kHz in external execution mode (with Simulink Coder)
  • Blocks supporting more than 250 I/O modules (including analog I/O, digital I/O, counters, encoders, and frequency output) and communication protocols (including UDP, serial, and CAN)
Running Simulink on a real-time target while connected to hardware.
A magnetic levitation control experiment. The model interfaces with external hardware using Analog Input and Analog Output blocks.

Real-Time Windows Target for Real-Time Testing

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.

Configuring Stream Input and Stream Output block parameters for a model on a real-time target.
Configuring Stream Input and Stream Output block parameters for a model on a real-time target. 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 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.

Monitoring and Capturing Signals in Real Time

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.

Acquiring and Logging Data

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.

Interacting with Models in Real Time

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.

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 engine. This synchronization enables the model to run in real time without requiring hardware.

Physical Device Connections

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:

  • Analog Input: Defines A/D converters to digitize analog signals as input signals to a Simulink model
  • Analog Output: Sets up D/A converters to digitize analog signals as output signals from a Simulink model
  • Digital Input: Connects digital input signals from external hardware to the Simulink model
  • Digital Output: Connects digital output signals from the Simulink model to external hardware
  • Counter Input: Counts pulses or measures frequency using hardware counters on I/O board(s)
  • Frequency Output: Generates pulse width modulation (PWM) signals on I/O board(s)
  • Encoder Input: Includes feedback from optical encoders
  • Packet Input: Receives unformatted binary data
  • Packet Output: Sends unformatted binary data
  • Stream Input: Receives formatted ASCII data
  • Stream Output: Sends formatted ASCII data
Real-Time Windows Target block library.
Real-Time Windows Target block library. The library enables you to connect I/O devices to Simulink signals for inputs and outputs while retaining I/O board connections and board settings for use with future models.

Try Real-Time Windows Target

Get trial software

Embedded Code Generierung - vom Simulationsmodell zum Seriencode

View webinar