Why does Simulink compilation fail with 'Potential conflicts' when using Data Store blocks and Data Dictionaries?
15 views (last 30 days)
Show older comments
MathWorks Support Team
on 15 Apr 2019
Edited: MathWorks Support Team
on 29 Aug 2024
I have a model in which I use a Data Store Memory block to define a 'Temp' variable. This variable is also defined in a Data Dictionary, such that I can share it with a referenced model. I use Data Store Write inside the reference model and Data Store Read in the main model.
Whenever I try to update or simulate the model, I get the following error:
Potential conflicting usages of identifier 'Temp': the data store associated with the block 'test_error/main_system/Data Store Memory', and a global data store memory 'Temp'
How do I fix this?
Accepted Answer
MathWorks Support Team
on 29 Jul 2024
Edited: MathWorks Support Team
on 29 Aug 2024
The issue arises because there is a clash between a global and a local data store. The Simulink.Signal object 'Temp' in the Data Dictionary defines a global Data Store because it can be accessed by all models in the hierarchy. Thus, the Data Store Memory block in the main model is now redundant because it also declares a local data store named 'Temp'.
You can find more information about the creation and application of Data Stores on the following page of the documentation page:
Please run the below command in the command window of installed MATLAB R2019a version to get release specific documentation
>> web(fullfile(docroot, 'simulink/ug/model-global-data-using-data-stores.html'))
In particular, the final sentence of the section 'Create and Apply Data Stores' should clarify this issue.
To resolve the error and continue with the simulation, you can remove the Data Store Memory block, and then Simulink will automatically read and write to the 'Temp' variable defined in the Data Dictionary. You will notice that the Data Store Read and Write blocks will show that 'Temp' is a global Data Store.
Please follow the below link to search for the required information regarding the current release:
0 Comments
More Answers (0)
See Also
Categories
Find more on Interactive Model Editing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!