Data Stores

Define global values for multiple signals at different levels of a model

A large model can require individual signals to route to many separate blocks in different locations in the diagram. You can configure a data store to allow access to signal data from anywhere in a model, similar to a global variable in a computer program. However, as with global variables, data stores can reduce model transparency and make model verification more difficult. To decide whether to use a data store, see When to Use a Data Store. To see data stores in use in a model, see Data Store Examples.

To route signals across large models, consider using Goto and From blocks instead of data stores.


Data Store Memory Define data store
Data Store Read Read data from data store
Data Store Write Write data to data store


Simulink.SimulationData.DataStoreMemory Container for data store logging information
Simulink.ModelDataLogs Container for signal data logs of a model
Simulink.SimulationData.BlockPath Fully specified Simulink block path
Simulink.SimulationData.Dataset Create Simulink.SimulationData.Dataset object


Was this topic helpful?