Search code examples
matlabsimulinkhierarchy

Simulink Datastore hierarchy


I know that I can access variables defined at the top level anywhere in the model. Is it possible to access a variable defined at the lower level?


Solution

  • From the documentation

    You can define two types of data stores:

    A local data store is accessible from anywhere in the model hierarchy that is at or below the level at which you define the data store, except from referenced models. You can define a local data store graphically in a model or by creating a model workspace signal object (Simulink.Signal).

    A global data store is accessible from throughout the model hierarchy, including from referenced models. Define a global data stores only in the MATLAB® base workspace, using a signal object. The only type of data store that a referenced model can access is a global data store.