Download Real-Time Workshop
Transcript
5
Working with Data Structures
Simulink disables the RTW storage class and RTW storage type
qualifier options in the State Properties dialog box, because the signal
object specifies these settings.
5 Click Apply and close the dialog box.
Note When a block state is associated with a signal object, the mapping
between the block state and the signal object must be one to one. If two or
more identically named entities, such as a block state and a signal, map
to the same signal object, the name conflict is flagged as an error at code
generation time.
Summary of State Storage Class Options
Here is a simple model, unit_delay.mdl, which contains a Unit Delay block:
The following table shows, for each state storage class option, the variable
declaration and initialization code generated for a Unit Delay block state. The
block state has the user-defined state name udx.
Storage Class
Declaration
Auto
In model.h
Initialization Code
unit_delay_DWork.udx = 0.0;
typedef struct
D_Work_unit_delay_tag
{
real_T udx;
}
D_Work_unit_delay;
5-60
Related documents
Real-Time Workshop User's Guide
Real-Time Workshop®
Writing S-Functions
Real-Time Workshop User`s Guide
MATLAB SIMULINK 7 - DEVELOPING S-FUNCTIONS User`s guide
MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER User`s guide
MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER User`s guide
Color Transformation Language User Guide and
PROYECTO FIN DE CARRERA - J. Manuel Gomez-de
Real-Time Workshop Release Notes