How to operate a variable in simulink?

Hi, I am using the Simulink with TI processors to design my application. In my application, i need a variable to store some information. I just find the Memory Allcoate block to specify the variable. But How i get and change the value of the variable specifiedby the Memory Allcoate block? Could anyone give me some solutions? or Is there any other to operate the variable? My matlab version:2009a,CCS version:3.3,DSP Processor: TMS320F2812
Best regards!

 采纳的回答

If you're using the Memory Allocate block, it appears that you need to use the Memory Copy block to read/write to it. But you can only exchange data between memory locations - ie., you cannot use a Simulink signal to read/write. If you just need a global variable, I would recommend using the Data Store Memory block with Data Store Read and Data Store Write blocks.

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Simulink 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by