Real-Time Workshop User's Guide | ![]() ![]() |
Introduction
The Real-Time Workshop rapid simulation target (rsim
) consists of a set of target files for nonreal-time execution on your host computer. You can use rsim
to generate fast, stand-alone simulations that allow batch parameter tuning and loading of new simulation data (signals) from a standard MATLAB MAT-file without needing to recompile your model.
C code generated from Real-Time Workshop is highly optimized to provide fast execution of discrete-time systems or systems that use a fixed-step solver. The speed of the generated code also makes it ideal for batch or Monte Carlo simulation. The run-time interface for the rapid simulation target enables the generated code to read and write data to standard MATLAB MAT-files. Using these support files, rsim
reads new signals and parameters from MAT-files at the start of the simulation.
After building an rsim
executable with Real-Time Workshop and an appropriate C compiler for your host computer, you can perform any combination of the following by using command line options. Without recompiling, the rapid simulation target allows you to:
double
, float
, int32
, uint32
, int16
, uint16
, int8
, uint8
, and complex data types) by using the From Workspace block
file used to save model output dataTherefore, you can easily write simple scripts that will run a set of simulations in sequence while using new data sets. These scripts can be written to provide unique filenames for both input parameters and input signals, as well as output filenames for the entire model or for To File blocks.
![]() | Real-Time Workshop Rapid Simulation Target | Building for the Rapid Simulation Target | ![]() |