Real-Time Workshop User's Guide | ![]() ![]() |
Signal Properties
The Simulink Signal Properties dialog lets you interface selected signals to externally written code. In this way, your hand-written code has access to such signals for monitoring or other purposes.
Read Signals: Storage, Optimization, and Interfacing to learn about general signal storage concepts and the Signal Properties dialog. Then note the Ada-specific differences described below.
The Real-Time Workshop Ada Coder has logic for supporting Simulink signal labels. This logic automatically maps signal labels to Simulink blocks based on the block name, signal name, and connectivity. You can override the default behavior and either specify an external declaration for the signal name or direct the Real-Time Workshop Ada Coder to declare a unique declaration of the signal that is visible in the generated model package specification. The heuristics are implemented on a signal basis as specified by the Signal name, RTW storage class, and RTW storage type qualifier (externally declared signals only).
The options relevant to the Real-Time Workshop Ada Coder are:
rtB
structure). This is useful for testing purposes since it eliminates the possibility of overwriting the signal data. Note that selecting this option forces the RTW storage class to be Auto
.Auto
: directs the Real-Time Workshop to store the signal in a persistent data structure. Specifically, an element called Signal_Name
is declared in the External_Inputs
structure defined in the Model_Types
package specification. The generated code accesses this signal as RT_U.Signal_Name
.ExportedGlobal
: Declares the signal as a global variable that can be accessed from outside the generated code. The signal is declared in the model package specification but not in the External_Inputs
structure. The generated code accesses this signal as Signal_Name
. The signal will be globally visible as Model.Signal_Name
.ImportedExtern
: The signal is assumed to be declared in the package specification entered in the RTW storage type qualifier field. The generated code accesses this signal as Your_Package.Signal_Name
.ImportedExternPointer
: This is not permitted in Ada.Imported Extern
option. This field is ignored in all other cases.These cases are useful if you want to link Real-Time Workshop Ada Coder generated code to other Ada code (i.e., code that the Real-Time Workshop Ada Coder did not generate).
![]() | Model Parameter Configuration | Code Validation | ![]() |