User`s guide

13 Real-Time Workshop Rapid Simulation Target
13-2
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 the
Real-Time Workshop 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
generatedcodetoreadandwritedatatostandardMATLABMAT-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:
Specify a new file(s) that provides input signals for From File blocks
Specify a new file that provides input signals with any Simulink data type
(
double, float, int32, uint32, int16, uint16, int8, uint8, and complex data
types) by using the From Workspace block
Replace the entire block diagram parameter vector (restricted to data of type
double) and run a simulation
Specify a new stop time for ending the stand-alone simulation
Specify a new name of the MAT-file used to save model output data
Specify name(s) of the MAT-files used to save data connected to To File
blocks
Sinceitispossibletoruntheseoptions:
Directly from your operating system command line (for example, DOS box or
UNIX shell) or
By using the bang (!) command with a command string at the MATLAB
prompt