Real-Time Workshop    

Symbolic Naming Conventions for Signals
in Generated Code

When signals have a storage class other than Auto, Real-Time Workshop preserves symbolic information about the signals or their originating blocks in the generated code.

For labelled signals, field names in rtB derive from the signal names. In the following example, the field names rtB.SinSig and rtB.Gain1Sig derive from the corresponding labeled signals in the Signals_examp model (shown in Figure 5-4).

For unlabeled signals, rtB field names derive from the name of the source block or subsystem. The naming format is

where system# is a unique system number assigned by Simulink, BlockName is the name of the source block, and outport# is a port number. The port number (outport#) is used only when the source block or subsystem has multiple output ports.

When a signal has Auto storage class, Real-Time Workshop controls generation of variable or field names without regard to signal labels.


  Interfacing Signals to External Code Summary of Signal Storage Class Options