| Real-Time Workshop | ![]() |
Simulink Data Objects and Code Generation
Before using Simulink data objects with Real-Time Workshop, please read the following:
Overview
Within the class hierarchy of Simulink data objects, Simulink provides two classes that are designed as base classes for signal and parameter storage. These are:
Simulink.Parameter: Objects that are instances of the Simulink.Parameter class or any class derived from Simulink.Parameter are called parameter objects.
Simulink.Signal: Objects that are instances of the Simulink.Signal class or any class derived from Simulink.Signal are called signal objects.
The RTWInfo properties of parameter and signal objects are used by Real-Time Workshop during code generation. These properties let you assign storage classes to the objects, thereby controlling how the generated code stores and represents signals and parameters.
Real-Time Workshop also writes information about the properties of parameter and signal objects to the model.rtw file. This information, formatted as Object records, is accessible to Target Language Compiler programs. For general information on Object records, see Object information in the model.rtw file in the Target Language Compiler Reference Guide.
The general procedure for using Simulink data objects in code generation is as follows:
Simulink.Data classes.
Simulink.Parameter.
Simulink.Signal.
The following sections describe the relationship between Simulink data objects and code generation in Real-Time Workshop.
| Parameter Tuning via MATLAB Commands | Parameter Objects | ![]() |