Remove Initialization Statements for Externally Defined State Variables
Prevent initialization of externally defined variables
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
ImportedExternandExportedGlobal.
OffGenerated code contains initialization assignment statements for variables that have storage class
ImportedExternandExportedGlobal.
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