Main Content

Generate Logging Code

Collect target run-time data for generated code

Model Configuration Pane: PLC Code Generation / Interface


The Generate logging code parameter generates code with logging instrumentation to collect run-time data on supported PLC targets. The PLC target IDEs must have support for inout variables. For Rockwell Automation® targets, you can set up an Open Platform Communications (OPC) server and use the Simulation Data Inspector (SDI) in Simulink® to visualize and monitor the logging data.


off (default) | on

Generate Function block logging code for supported targets.


No logging instrumentation is included in the generated code.

Recommended Settings

TraceabilityNo impact
EfficiencyNo impact
Safety precautionNo impact

Programmatic Use

Parameter: PLC_GenerateLoggingCode
Type: string
Value: 'on' | 'off'
Default: 'off'

Version History

Introduced in R2018a