Why do duplicate subsystems with data store memory blocks cause an error?

5 views (last 30 days)
When I create a subsystem that contains a data store memory block and then create copies of that subsystem, I get an error saying that there is a duplicate data store memory tag used in each of the subsystems. The subsystems are identical, so they do in fact use the same data story memory tag, but that should not be an issue because the scope of a data store memory block should only include the current subsystem level and below. Why am I getting this error?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 1 Nov 2022
This error message is actually able to be turned off. You can do so by navigating to "Model Settings->Diagnostics->Data Validity" and toggling "Duplicate data store names" from "error" to "none". Once you make this change, you should notice that your model runs without issue and maintains separate data stores for each subsystem.
The "Duplicate data store names" diagnostic considers all subsystems and references in the model and does not factor in data store block visibility, which is why it was triggering an error even when the data store memory blocks were in different subsystems.

More Answers (0)

Categories

Find more on Component-Based Modeling in Help Center and File Exchange

Products


Release

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!