create code generation report
generate a traceability report
generate a simulink® plc coder™ code generation report by using the configuration parameters dialog box:
verify that the model is open.
open the plc coder app. click the plc code tab.
click settings and navigate to the plc code generation pane.
to enable report generation, select the report > generate traceability report check box.
to open the code generation report upon completion of code generation, select the report> open report automatically check box. click ok.
click generate plc code to initiate code and report generation. the coder generates html report files as part of the code generation process. the html report opens.
the traceability report section enables you to account for eliminated / virtual blocks that are untraceable, versus the listed traceable simulink blocks / stateflow objects / matlab scripts, providing a complete mapping between model elements and code.
the static code metrics report section provides generated code statistics. metrics are estimated from static analysis of the generated code.
in the generated files section, you can click the names of source code files generated from your model to view their contents in a matlab® web browser window. in the displayed source code:
global variable instances are hyperlinked to their definitions.
you can use the hyperlinks within the displayed source code to view the blocks or subsystems from which the code was generated. click the hyperlinks to view the relevant blocks or subsystems in a simulink model window.
you can view the generated code for a block in the model. to highlight a block's generated code in the html report, click the block and in the plc coder app, review results pane, click navigate to code.
for more information, see:
limitation
if you generate a code generation report for a model, and then change the model, the report becomes invalid. to keep your code generation report current, after modifying the source model, regenerate code and the report. if you close and then reopen a model, regenerate the report.