Simulink Reference Previous page   Next Page
Data Store Memory

Define a data store

Library

Signal Routing

Description

The Data Store Memory block defines and initializes a named shared data store, which is a memory region usable by Data Store Read and Data Store Write blocks with the same data store name.

The location of the Data Store Memory block that defines a data store determines the Data Store Read and Data Store Write blocks that can access the data store:

You initialize the data store by specifying a scalar value or an array of values in the Initial value parameter. The dimensions of the array determine the dimensionality of the data store. Any data written to the data store must have the dimensions designated by the Initial value parameter. Otherwise, an error occurs.

Data Type Support

The Data Store Memory block stores real or complex signals of any data type supported by Simulink, including fixed-point data types.

For a discussion on the data types supported by Simulink, refer to Data Types Supported by Simulink in the Using Simulink documentation.

Parameters and Dialog Box

The Main pane of the Data Store Memory block dialog appears as follows:

Data store name
Specify a name for the data store you are defining with this block. Data Store Read and Data Store Write blocks with the same name will be able to read from and write to the data store initialized by this block.
Corresponding Data Store Read blocks
This parameter lists all the Data Store Read and Data Store Write blocks that have the same data store name as the current block, and that are in the current (sub)system or in any subsystem below it in the model hierarchy. Double-click any entry on this list to highlight the block and bring it to the foreground.
Initial value
Specify the initial value or values of the data store. The dimensions of this value determine the dimensions of data that may be written to the data store.
Data store must resolve to Simulink signal object
Causes Simulink, when compiling the model, to search the model and base workspace for a Simulink.Signal object having the same name. If such an object is not found, Simulink halts the compilation and displays an error. Otherwise Simulink compares the attributes of the signal object with the corresponding attributes of the data store memory block. If the block and the object attributes are inconsistent, Simulink halts model compilation and displays an error.

These following parameters pertain to code generation and have no effect during model simulation:

See "Block States: Storing and Interfacing" in the Real-Time Workshop® documentation for more information.

Interpret vector parameters as 1-D
If selected and the Initial value parameter is specified as a column or row matrix, the data store is initialized to a 1-D array whose elements are equal to the elements of the row or column vector.

The Data types pane of the Data Store Memory block dialog appears as follows:

Data type
Select the data type of the values stored in the data store from the drop-down menu. If you select auto, Simulink sets the data type of the data store to the data type of the data store read and write blocks that access it. If you select Specify via dialog, the dialog box displays the Output data type and Output scaling value fields, which enable you to specify fixed-point and other data types not listed in the drop-down menu.
Output data type
Specify any data type for the data store, including fixed-point data types. This parameter is only visible if you select Specify via dialog for the Data type parameter.
Output scaling value
Set the output scaling using either binary point-only or [Slope Bias] scaling. This parameter is only visible if you select Specify via dialog for the Data type parameter.
Signal type
Specify the numeric type, real or complex, of the values stored in the data store.

Characteristics

Sample Time
N/A
Dimensionalized
Yes

See Also

Data Store Read, Data Store Write


Previous page  Counter Limited Data Store Read Next page

© 1994-2005 The MathWorks, Inc.