Detect read before write
Diagnostic action to take if model reads from data store before writing to that data store in current time step
Model Configuration Pane: Diagnostics / Data Validity
Description
The Detect read before write parameter specifies the diagnostic action to take if a model tries to read data from a data store before writing to the data store in the current time step.
The software overrides this parameter value for model references that simulate in a mode other than normal if the referenced model sets this parameter to a value other than Disable all
.
Settings
Use local settings
(default) | Disable all
| Enable all as warnings
| Enable all as errors
Use local settings
With this setting, the diagnostic action is configured individually for each local data store defined by a Data Store Memory block or a
Simulink.Signal
object in a model workspace.The software does not issue a diagnostic for global data stores defined by
Simulink.Signal
objects in the base workspace.Disable all
The software does not issue a diagnostic if the model reads from any data store before writing to that data store.
Enable all as warnings
The software issues a warning if the model reads from any data store before writing to the data store. The warning appears in the MATLAB® Command Window.
Enable all as errors
The software issues an error and terminates the simulation if the model reads from any data store before writing to the data store. The error appears in a dialog box.
Tips
To identify model references for which the software changes configuration parameter settings, use the Model Advisor.
In the Simulink® Toolstrip, on the Modeling tab, click Model Advisor.
Click OK.
In the Model Advisor, click the arrow to expand the By Task list. Then, click the arrow to expand the Model Referencing list.
Select and run the Check diagnostic settings ignored during accelerated model reference simulation check.
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | Enable all as errors |
Programmatic Use
Parameter:
ReadBeforeWriteMsg |
Type: string | character vector |
Value: "UseLocalSettings" | "DisableAll" | "EnableAllAsWarning" | "EnableAllAsError" |
Default: "UseLocalSettings" |
Version History
Introduced in R2006a