Automatically infer global variables as function interfaces
Option to automatically populate global variables as function inputs and outputs by running custom code analysis
Since R2022a
Model Configuration Pane: Simulation Target
Description
Specify the behavior of global variables in custom code called by the C Caller block. If you select this option, the C Caller block automatically infers global variables from the custom code on the block interface.
Category: Simulation Target
Settings
onEnables automatic addition of global variables from the custom code called by C Caller block. C Caller block treats the global variables in your custom code as global arguments on the block interface. These arguments appear in bold on the Port Specification table.
offDisables automatic addition of global variables from the custom code called by the C Caller block. From the MATLAB® command line, use the
addGlobalArgfunction to add or thedeleteGlobalArgfunction to delete global arguments.
Recommended Settings
| Application | Setting |
|---|---|
| Debugging | No impact |
| Traceability | No impact |
| Efficiency | No recommendation |
| Safety precaution | No recommendation |
Programmatic Use
Parameter: CustomCodeGlobalsAsFunctionIO |
Value: "on" | "off" |
Default: "off" |
Version History
Introduced in R2022a