コマンドで Data Store Read ブロックに対応する Read Store Memory ブロックを取得する方法はありますか?
2 views (last 30 days)
Show older comments
MathWorks Support Team
on 3 Feb 2015
Answered: MathWorks Support Team
on 3 Feb 2015
Data Store Read ブロックのマスクを開くことで、関連する Data Store Memory ブロックが分かります。しかし、GET_PARAM コマンドを使ってプロパティを指定することで取得することができません。
Accepted Answer
MathWorks Support Team
on 3 Feb 2015
Data Store Read ブロックに関連する Data Store Memory ブロックを取得するためのプロパティは用意されておりません。
下記の2ステップで、ブロック名を取得することができます。
1) GET_PARAM コマンドを使って、Data Store Read ブロックから Data Store Name を取得します。
mem_name = get_param('datastore_example/Read','DataStoreName');
1つ目の入力引数は、Data Store Memory ブロックの振るパスで、2つ目が該当のプロパティ、DataStoreName です。
2) FIND_SYSTEM 関数を使い、どの Data Store Memoryブロックが対応する Data Store Name を持つか検索が行えます。
block_name = find_system('datastore_example','BlockType','DataStoreMemory','DataStoreName',mem_name)
1つ目の入力引数はモデル名、2つ目、3つ目の入力引数が検索に使用するプロパティ 'BlockType' とその対応する値 (Data Store Memory の場合は 'DataStoreMemory', Data Store Write の場合は ’DataStoreWrite’、Data Store Read の場合は 'DataStoreRead') です。 最後の2つのプロパティが、DataStoreName の文字列と、Data Store Name の文字を指定します。
0 Comments
More Answers (0)
See Also
Categories
Find more on Author Block Masks 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!