Detect read before write
Description
Select the diagnostic action to take if the model attempts to read data from a data store to which it has not written data in this time step.
Category:Diagnostics
Settings
Default:Use local settings
-
Use local settings
-
For each local data store (defined by a Data Store Memory block or
Simulink.Signal
object in a model workspace) use the setting specified by the block. For each global data store (defined by aSimulink.Signal
object in the base workspace) disable the diagnostic. -
Disable all
-
Disables this diagnostic for all data stores accessed by the model.
-
Enable all as warnings
-
Displays diagnostic as a warning at the MATLAB®command line.
-
Enable all as errors
-
Halts the simulation and displays the diagnostic in an error dialog box.
Note
During model referencing simulation in accelerator and rapid accelerator mode, if theDetect read before writeparameter is set toEnable all as warnings
,Enable all as errors
, orUse local settings
, Simulink®temporarily changes the setting toDisable all
.
You can use the Model Advisor to identify referenced models for which Simulink changes configuration this parameter setting during accelerated simulation.
In the Simulink Editor, in theModelingtab, click模型的顾问,然后单击OK.
SelectBy Task.
Run theCheck diagnostic settings ignored during accelerated model reference simulationcheck.
Command-Line Information
Parameter:ReadBeforeWriteMsg |
Value:'UseLocalSettings' |'DisableAll' |'EnableAllAsWarning' |'EnableAllAsError' |
Default:'UseLocalSettings' |
Recommended Settings
Application | Setting |
---|---|
Debugging | No impact |
Traceability | No impact |
Efficiency | No impact |
Safety precaution | Enable all as errors |