These examples show the features of Simulink® Real-Time™. Use these scripts as a starting point for writing your own scripts for creating and testing real-time applications.
Examples include general applications examples and driver examples. You can access the general application and driver examples through MATLAB® Help. In the help window, click Real-Time Simulation and Testing > Simulink Real-Time > Examples.
The general application examples include models and scripts.
Real-time parameter tuning and data logging
Freerun display mode of a host scope
A software-triggered host scope
A signal-triggered host scope
A scope-triggered host scope
Signal tracing with a target scope
Pre- and post-triggering of a host scope
Time- and value-equidistant data logging
Logging signal data with the Simulation Data Inspector to a file on the development computer
Frame signal processing
Simulink Real-Time software as a real-time spectrum analyzer
Creating a custom client application to interface with the target computer
Concurrent execution of a model using the Simulink Real-Time profiling tool
These driver examples include models and scripts showing the use of driver blocks in a Simulink Real-Time environment. To run some of these examples, you must install specific hardware.
Analog and digital I/O
CAN (CAN_MESSAGE data types)
Counters, timers, pulse width modulators (PWM)
Digital signal processing
Precision Time Protocol (PTP)
To locate and edit an example such as Signal Tracing With a Host Scope in Freerun Mode:
Follow the link to the example and determine its MATLAB file name, in this case
In the MATLAB Command Window, type:
MATLAB displays the location of the MATLAB example file.
MATLAB opens the file in the MATLAB Editor.