Corresponding Read/Write Blocks of a Data Store Memory
4 views (last 30 days)
Show older comments
Hi,
I am trying to get a list of all Corresponding Read/Write Blcoks of a Data Store Memory.
And i am not getting how to the list.
I am getting all the Data Store Memories information using below lines...
mem_block_handle = find_system(strtok(fileName,'.'),'FindAll','On','FollowLinks','On','LookUnderMasks','all','BlockType','DataStoreMemory');
block_list_memblocks = '';
for i =1:length(mem_block_handle)
%block_list_memblocks{i,1} = get_param(mem_block_handle(i),'Corresponding Data Store Read/Write Blocks'); %% % Tried in this way
end
Can anyone help me.
0 Comments
Answers (1)
Akshat Dalal
on 2 Mar 2025
Edited: Akshat Dalal
on 2 Mar 2025
Hi
You can utilize the 'find_system' API to find the Data store read/write blocks for any particular DSM block as shown below:
% Find all Data Store Read blocks associated with the Data Store
readBlocks = find_system(modelName, 'BlockType', 'DataStoreRead', 'DataStoreName', dataStoreName);
% Find all Data Store Write blocks associated with the Data Store
writeBlocks = find_system(modelName, 'BlockType', 'DataStoreWrite', 'DataStoreName', dataStoreName);
You can filter them by the 'DataStoreName' parameter which will only return the Data store read/write blocks associated with the DSM 'dataStoreName'.
Please find more information about the 'find_system' API here: https://www.mathworks.com/help/simulink/slref/find_system.html
0 Comments
See Also
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!