Products & Services Solutions Academia Support User Community Company

Learn more about Real-Time Workshop   

Version 4.0 (R12) Real-Time Workshop Software

This table summarizes what's new in V4.0 (R12):

New Features and ChangesVersion Compatibility ConsiderationsFixed Bugs and Known ProblemsRelated Documentation at Web Site
Yes
Details below
Yes—Details labeled as Compatibility Considerations, below. See also Summary.No bug fixesNo

New features and changes introduced in this version are

New Real-Time Workshop Embedded Coder Product

Real-Time Workshop Embedded Coder software is a new add-on product that replaces and enhances the Embedded Real-Time (ERT) target.

See the Real-Time Workshop Embedded Coder documentation for details.

Compatibility Considerations

The new Real-Time Workshop Embedded Coder product is 100% compatible with the ERT target. In addition to supporting all previous functions of the ERT target, the new Real-Time Workshop Embedded Coder product includes many enhancements.

Support for Simulink Data Objects

The Real-Time Workshop software supports Simulink data objects. Simulink provides the built-in Simulink.Parameter and Simulink.Signal classes for use with the Real-Time Workshop software. Using these classes, you can create parameter and signal objects and assign storage classes and storage type qualifiers to the objects. These properties control how the generated code represents signals and parameters. You can extend the Simulink.Parameter and Simulink.Signal classes to include user-defined properties.

See Simulink Data Object Considerations in the Real-Time Workshop documentation for details.

Support for ASAP2 Data Files

ASAP2 is a data definition standard proposed by the Association for Standardization of Automation and Measuring Systems (ASAM). This standard is used for data measurement, calibration, and diagnostic systems.

The Real-Time Workshop software now lets you export an ASAP2 file containing information about your model during the code generation process. See Generating an ASAP2 File in the Real-Time Workshop documentation for details.

Enhanced Real-Time Workshop Configuration Pane

The Real-Time Workshop pane of the Simulation Parameters dialog box has been reorganized and made easier to use. See Preparing Models for Code Generation in the Real-Time Workshop documentation for details.

Other User Interface Enhancements

See the Real-Time Workshop documentation for details.

Compatibility Considerations

The double-click mechanism for selecting a target configuration from the System Target File Browser does not replace the previous selection method. You can still select a target entry and then click OK.

Support for New Simulink Advanced Options Pane

An Advanced pane options pane has been added to the Simulation Parameters dialog box. The Advanced pane contains

Compatibility Considerations

Simulation Parameters dialog box options formerly located in the Diagnostics and Real-Time Workshop panes have been relocated to the new Advanced pane.

Model Parameter Configuration Dialog Box

The Model Parameter Configuration dialog box extends and replaces the Tunable Parameters dialog box. The Model Parameter Configuration dialog box enables you to

See Parameter Considerations in the Real-Time Workshop documentation for details.

Compatibility Considerations

You must now use the Model Parameter Configuration dialog box instead of the Tunable Parameters dialog box to declare tunable parameters.

Support for Tunable Expressions

A tunable expression is an expression that contains one or more tunable parameters. Tunable expressions are now supported during simulation and in generated code.

Tunable expressions are allowed in masked subsystems. You can use tunable parameter names or tunable expressions in a masked subsystem dialog box. When referenced in lower-level subsystems, such parameters remain tunable.

See Tunable Expressions in the Real-Time Workshop documentation for a detailed discussion on using tunable parameters in expressions.

S-Function Target Enhancements

S-function target enhancements include:

The S-function target is now documented in Creating Component Object Libraries and Enhancing Simulation Performance in the Real-Time Workshop documentation.

External Mode Enhancements

New features have been added to external mode:

Compatibility Considerations

Previously, you could use only Scope blocks in external mode to receive and view signals uploaded from the target program. The following features now support external mode:

Build Directory

The Real-Time Workshop build process now creates a build directory within your working directory. The build directory stores generated source code and other files created during the build process. The Real-Time Workshop software derives the build directory name, model_target_rtw, from the name of the source model and the chosen target.

See Directories Used During the Build Process in the Real-Time Workshop documentation for details.

Compatibility Considerations

If you have created custom targets for the Real-Time Workshop software under Release 11, you must update your custom system target files and template makefiles to create and utilize the build directory. See matlabroot/rtw/c/grt for examples.

To update a Release 11 target:

  1. Add the following to your system target file.

    /%
    BEGIN_RTW_OPTIONS
    .
    .
    .
    rtwgensettings.BuildDirSuffix = '_grt_rtw';
    END_RTW_OPTIONS 
    %/ 
    
  2. Add ".." to the INCLUDES rule in your template makefile. The following example is from grt_lcc.tmf.

    INCLUDES = -I. -I.. $(MATLAB_INCLUDES) $(USER_INCLUDES)
    

    The first -I. gets files from the build directory, and the second -I.. gets files (e.g., user written S-functions) from the current working directory.

    Conceptually, think of the current directory and the build directory as the same (as it was in Release 11). The current working directory contains items like user written S-functions. The reason ".." must be added to the INCLUDES rule is that make is invoked in the build directory (i.e., the current directory was temporarily moved).

  3. Place the generated executable in your current working directory. The following example is from grt_lcc.tmf.

    PROGRAM = ../$(MODEL).exe
    $(PROGRAM) : $(OBJS) $(RTWLIB)
    	$(LD) $(LDFLAGS) -o $@ $(LINK_OBJS) $(RTWLIB) $(LIBS)
    

Code Optimization Features

This section describes new or modified code generation options that are designed to help you optimize your generated code. The options described are located on the Advanced pane of the Simulation Parameters dialog box.

See Optimizing Generated Code in the Real-Time Workshop documentation for more information on code optimization.

Compatibility Considerations

The Signal storage reuse option replaces the (Enable/Disable) Optimized block I/O storage option of previous releases. Signal storage reuse is functionally identical to the older option. Turning Signal storage reuse on is equivalent to enabling Optimized block I/O storage.

Subsystem Code Generation

The Real-Time Workshop software now generates code and builds an executable from any subsystem within a model. The build process uses the code generation and build parameters of the root model. See Generating Code and Executables from Subsystems in the Real-Time Workshop documentation for details.

Nonvirtual Subsystem Code Generation

The Real-Time Workshop software now lets you generate code modules at the subsystem level. This feature applies only to nonvirtual subsystems. With nonvirtual subsystem code generation, you control how many files are generated, as well as the file and function names. To set options for nonvirtual subsystem code generation, you use the subsystem's Block Parameters dialog box.

See Creating Subsystems in the Real-Time Workshop documentation for details.

Compatibility Considerations

Nonvirtual subsystem code generation replaces the Function management code generation options available in previous releases. Nonvirtual subsystem code generation is a more general and flexible mechanism for controlling the number and size of generated files than the Function management code generation options, File splitting and Function splitting.

Standard Filename Extensions for Generated Files

The Real-Time Workshop software now generates source code and header files that have standard filename extensions —.c and .h.

Compatibility Considerations

In previous releases, the Real-Time Workshop software gave some generated files special filename extensions, such as .prm or .reg. As of this release, the Real-Time Workshop software generates source code and header files that have standard filename extensions. The file naming conventions for the following generated files have changed:

FileOld FilenameNew Filename
Model registration filemodel.regmodel_reg.h
Model parameter filemodel.prmmodel_prm.h
BlockIOSignals structure filemodel.biomodel_bio.c
ParameterTuning filemodel.ptmodel_pt.c
External mode data type transition filemodel.dtmodel_dt.c

If your application code uses #include statements to include the Real-Time Workshop software generated files (such as model.prm), you may need to modify these statements. See Files Created During Build Process in the Real-Time Workshop documentation.

hilite_system and Code Tracing

The Real-Time Workshop software uses a new command, hilite_system, to write system/block identification tags in the generated code. The tags are designed to help you identify the block, in your source model, that generated a given line of code.

For more information on identification tags and code tracing, see Tracing Generated Code.

Compatibility Considerations

In previous releases, the Real-Time Workshop software used the locate_system command to trace a tag back to the generating block. The Real-Time Workshop software now uses the new hilite_system command to trace identification tags instead of locate_system. Starting with this release, use the hilite_system command to trace a tag back to the generating block.

Generation of Parameter Comments

The Force generation of parameter comments option in the General code generation optionssection of the Real-Time Workshop pane of the Simulink Parameters dialog box controls the generation of comments in the model parameter structure (rtP) declaration in model_prm.h. This lets you reduce the size of the generated file for models with a large number of parameters.

Borland 5.4 Compiler Support

The Real-Time Workshop software now supports Version 5.4 of the Borland C/C++ compiler.

Enhanced Makefile Include Path Rules

Two new rules and macros have been added to Real-Time Workshop template makefiles. These rules let you add source and include directories to makefiles generated by the Real-Time Workshop software without having to modify the template makefiles themselves. This feature is useful if you need to include your code when building S-functions.

Column-Major Matrix Ordering

The Real-Time Workshop software now uses column-major ordering for two-dimensional signal and parameter data instead of row-major ordering.

Compatibility Considerations

In previous releases, the Real-Time Workshop software used row-major ordering for two-dimensional signal and parameter data. The Real-Time Workshop software now uses column-major ordering.

If your hand-written code interfaces to such signals or parameters via ExportedGlobal, ImportedExtern, or ImportedExternPointer declarations, review any code that relies on row-major ordering, and make appropriate revisions.

S-Function Target MEX-Files Must Be Rebuilt

Compatibility Considerations

S-function MEX-files generated by the S-function target under V3.0 (R11) are not compatible with V4.0 (R12). The incompatibilities are due to new features, such as parameter pooling.

If you have built S-function MEX-files with the S-function target under V3.0 (R11), you must rebuild them. See Creating Component Object Libraries and Enhancing Simulation Performance in the Real-Time Workshop documentation for more information.

Target Language Compiler Enhancements

The Target Language Compiler has been enhanced as follows:

Compatibility Considerations

If you are upgrading from Release 11 to Release 12, the following changes may affect your TLC code:

  


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