Products & Services Solutions Academia Support User Community Company

Learn more about Real-Time Workshop   

rtwtrace - Trace block to generated code

Syntax

rtwtrace(blockpath)

Description

rtwtrace(blockpath) opens an HTML code generation report, that displays contents of the source code file, and highlights the line of code corresponding to the specified block. blockpath is a string enclosed in quotes specifying the full Simulink block path, for example, 'model_name/block_name'. Before calling rtwtrace, you must enable model to code navigation. On the Configuration parameter dialog box, select Real-Time Workshop > Report pane, and select the Model-to-code parameter. Generate code for your model using the Real-Time Workshop Embedded Coder software. The build directory must be under the current working directory, otherwise rtwtrace might produce an error.

Examples

Trace to the source code for block Out1 in rtwdemo_comments.mdl:

rtwtrace('rtwdemo_comments/Out1')

The HTML code generation report opens and highlights the first instance of code generated for block Out1.

Alternatives

To trace from a block in the model diagram, right-click a block and select Real-Time Workshop > Navigate to code.

How To

  


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