Products & Services Solutions Academia Support User Community Company

Learn more about Stateflow   

Targets You Can Build

Code Generation for Stateflow Charts and Truth Table Blocks

You can generate code for models with Stateflow charts and Truth Table blocks for these uses:

Code Generation for Simulation

A simulation target is a specification of the generated code, custom code, and build type you use for generating simulation code for Chart and Truth Table blocks in a model.

Whenever you simulate a model that contains Stateflow blocks, Stateflow software generates code that compiles into an S-function MEX file (for details, see S-Function MEX-Files). This code enables the Stateflow blocks to interface with other blocks in a Simulink model, the MATLAB base workspace, and the Stateflow Debugger. This code is not suitable for production or rapid prototyping.

Code Generation for Production and Rapid Prototyping

An embeddable target is a specification of the generated code, custom code, and build type you use for generating production code for Chart and Truth Table blocks in a model.

Stateflow Coder and Real-Time Workshop software can work together to generate embeddable code for Stateflow blocks. This code is optimized for production and rapid prototyping, but does not contain code to interface with other blocks in a Simulink model, the MATLAB base workspace, and the Stateflow Debugger.

Software Requirements for Building Targets

To build targets for models with Stateflow charts or Truth Table blocks, you must have a license for the software listed:

Target to BuildSoftware to Use
Simulation targetStateflow
Embeddable targetStateflow Coder and Real-Time Workshop

The default target type of Real-Time Workshop code generation is generic real-time (grt). To build other embeddable targets, you must have the appropriate license. See Available Targets in the Real-Time Workshop User's Guide for more information.

  


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