Generate Code for Data Store Blocks

This example shows how SimWB can be used to generate code for Data Store blocks in a Simulink® model.

Data Store Blocks

Data Store blocks allow you to share data globally across a model, without having to use source/sink blocks to transfer data between subsystems. The Data Store Memory, Data Store Read, and Data Store Write blocks are available in the Simulink > Signal Routing library.

Code Generation

To indicate that a Data Store Read/Write block must be converted to an RTDB variable, specify a regular expression prefix in the block name. For example, the following model prefixes the relevant block names with SW.

Generate RTDB for Data Store Read/Write Blocks
Figure 1: Generate RTDB for Data Store Read/Write Blocks

RTDB for ccur_datastore_signal_types
Figure 2: signal.db file for ccur_datastore_signal_types

Points to note:

Limitations:

Related Links

Examples

Blocks

Simulink®, developed by MathWorks, is a graphical modeling environment.