Products & Services Solutions Academia Support User Community Company

Learn more about Real-Time Workshop   

Introduction

Before using Simulink data objects with the Real-Time Workshop product, read the following:

Within the class hierarchy of Simulink data objects, the Simulink product provides two classes that are designed as base classes for signal and parameter storage:

The RTWInfo properties of parameter and signal objects are used by the Real-Time Workshop product 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.

The Real-Time Workshop build process 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 the Target Language Compiler documentation.

The general procedure for using Simulink data objects in code generation is as follows:

  1. Define a subclass of one of the built-in Simulink.Data classes.

    • For parameters, define a subclass of Simulink.Parameter.

    • For signals, define a subclass of Simulink.Signal.

  2. Instantiate parameter or signal objects from your subclass and set their properties appropriately, from the command line or using Model Explorer.

  3. Use the objects as parameters or signals within your model.

  4. Generate code and build your target executable.

The following sections describe the relationship between Simulink data objects and code generation in the Real-Time Workshop product.

  


Related Products & Applications

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