Remove Initialization Statements for Externally Defined State Variables
Prevent initialization of externally defined variables
Since R2020b
Model Configuration Pane: PLC Code Generation / Interface
Description
The Remove initialization statements for externally defined state
variables parameter removes initialization assignment statements for
variables that have storage class ImportedExtern
and
ExportedGlobal
from the generated code. Mark
ExportedGlobal
variables as externally defined. For more
information, see Externally Defined Identifiers
Settings
- On
Remove from the generated code initialization assignment statements for variables that have storage class
ImportedExtern
andExportedGlobal
.- Off
Generated code contains initialization assignment statements for variables that have storage class
ImportedExtern
andExportedGlobal
.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | No impact |
Programmatic Use
Parameter: PLC_PreventExternalVarInitialization |
Type: string |
Value: 'on' | 'off' |
Default: 'off' |
Version History
Introduced in R2020b