| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Real-Time Workshop |
| Contents | Index |
| Learn more about Real-Time Workshop |
When signals have a storage class other than Auto, the Real-Time Workshop product preserves symbolic information about the signals or their originating blocks in the generated code.
For labeled signals, field names in model_B derive from the signal names. In the following example, the field names model_B.sumSig and model_B.gainSig are derived from the corresponding labeled signals in the signal_examp model (shown in figure Signal_examp Model).
/* Block signals (auto storage) */
typedef struct _BlockIO_signal_examp {
real_T sumSig; /* '<Root>/Add' */
real_T gainSig; /* '<Root>/Gain' */
} BlockIO_signal_examp;
When you clear the Signal Storage Reuse optimization, sumSig is not part of model_B, and a local variable is used for it instead. For unlabeled signals, model_B field names are derived from the name of the source block or subsystem.
The components of a generated signal label are
The root model name, followed by
The name of the generating signal object, followed by
A unique name mangling string (if required)
The number of characters that a signal label can have is limited by the Maximum identifier length parameter specified on the Symbols pane of the Configuration Parameters dialog box. See Configuring Generated Identifiers for more detail.
When a signal has Auto storage class, the Real-Time Workshop build process controls generation of variable or field names without regard to signal labels.
![]() | Interfacing Signals to External Code | Summary of Signal Storage Class Options | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |