Before You Start

www.kxcad.net Home > CAE Software Index > MATLAB Index >


Your Ad Here

Create Shared Memory Partitions

xPC Target uses a model for reflective memory (also known as shared memory) that includes Simulink blocks, for the shared memory drivers, and MATLAB structures for defining shared memory and node initialization partitions. The topics in this section are

To use the xPC Target SCRAMNet+ SC150 shared memory blocks to read, write, pack, or unpack data, you must define a partition structure. SCRAMNet+ SC150 shared memory drivers use MATLAB structures to define shared memory partitions. A partition structure describes how you want to allocate (or partition) the shared memory. xPC Target allocates shared memory with bundles of data that are packed into memory partitions. The following SCRAMNet+ SC150 blocks use shared memory partition structures:

After you define the shared memory partitions, you can add SCRAMNet+ SC150 shared memory driver blocks to your Simulink model. Create a shared memory structure in one of the following ways. See Shared Memory Partition Structure for the complete list of fields for the structure.

The following description refers to the completepartitionstruct command. Type

help completepartitionstruct

for a description of the command.

You can then call the completepartitionstruct() command to full populate the partition structure.

Initialize Shared Memory Nodes

To use the xPC Target SCRAMNet+ SC150 shared memory, you must define a node initialization structure. SCRAMNet+ SC150 shared memory drivers use MATLAB structures to define shared memory node initializations. A node initialization structure describes the shared memory partition (see Create Shared Memory Partitions) and the SCRAMNet+ SC150 board configuration, including interrupt configurations. The following SCRAMNet+ SC150 block requires shared memory node initialization structures:

After you define the node initialization partition, you can add SCRAMNet+ SC150 shared memory driver blocks to your Simulink model. Create a shared memory structure in one of the following ways. See Shared Memory Node Initialization Structure for the complete list of fields for the structure.

The following description refers to the completenodestruct command. Type

help completenodestruct

for a description of the command.

  


© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments

Your Ad Here