User`s guide
6 Program Architecture
6-22
Block outputs can also go to the external output structure (rtY). The following
figure shows the general mapping between these items.
Figure 6-5: Data View of the Generated Code
Structure definitions:
• Block I/O Structure (
rtB) — This structure consists of all block output
signals. The number of block output signals is the sum of the widths of the
data output ports of all nonvirtual blocks in your model. If you activate block
I/O optimizations by unchecking the
Disable block I/O optimizations check
box on the Diagnostics page of the
Simulation Parameters dialog box,
Simulink and the Real-Time Workshop reduce the size of the
rtB structure
by:
- Reusing the entries in the
rtB structure
- Making other entries local variables
Structure field names are determined by either the block’s output signal
name (when present) or by the block name and port number when the output
signal is left unlabeled.
• Block States Structure (
rtX) — The states structure contains the continuous
and discrete state information for any blocks in your model that have states.
Block
Block I/O
Struct,
rtB
External
Outputs
Struct,
rtY
External
Inputs
Struct,
rtU
rtGround
Work
Structs,
rtRWork,
rtIWork,
rtPWork,
....
Parameter
Struct,
rtP
States
Struct,
rtX