Detect loss of tunability - Diagnostic action to take if code generation reduces expression with tunable variables to numeric equivalent - MATLAB (original) (raw)
Main Content
Diagnostic action to take if code generation reduces expression with tunable variables to numeric equivalent
Model Configuration Pane: Diagnostics / Data Validity
Description
The Detect loss of tunability parameter specifies the diagnostic action to take when code generation reduces an expression with tunable variables to the numeric equivalent. This parameter applies only to:
Simulink.Parameter
objects that have a storage class other thanAuto
Simulink.Parameter
objects that have theAuto
storage class and are mapped to a storage class other thanAuto
- MATLABĀ® variables that you map to a storage class other than
Auto
When the Default parameter behavior (Simulink Coder) parameter is set to Tunable
, this parameter does not apply to variables that have the Auto
storage class.
The default diagnostic action depends on the type of the code generation target.
- For ERT targets, the software issues an error by default.
- For GRT targets, the software issues a warning by default.
Settings
error
| warning
| none
error
The software issues an error and terminates simulation or code generation if code generation reduces an expression with tunable variables to the numeric equivalent.
This is the default setting for ERT targets.
warning
The software issues a warning if code generation reduces an expression with tunable variables to the numeric equivalent.
This is the default setting for GRT targets.
none
The software does not issue a diagnostic if code generation reduces an expression with tunable variables to the numeric equivalent.
Tips
If a tunable workspace variable is modified in mask initialization code or used in an arithmetic expression that includes unsupported operators or functions, the expression is reduced to the numeric equivalent and the variable values are no longer tunable.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | error |
Programmatic Use
Parameter: ParameterTunabilityLossMsg | |
---|---|
Type: string | character vector | |
Value: "none" | "warning" | "error" |
Default: "warning" for GRT targets | "error" for ERT targets |
Version History
Introduced in R2007a