Simulink R2020b DataStore Memory and String support. Cannot use a string as an Inital Value

3 ビュー (過去 30 日間)
PLR
PLR 2024 年 10 月 1 日
編集済み: Jaimin 2024 年 10 月 9 日
In Simulink R2020b, I cannot use the DataStore Memory block with a string Initial Value although the DataType is set on "string".
The error message is the following : "Invalid setting in '<SYSTEM>/Data Store Memory' for parameter 'InitialValue'.
Am I doing anything wrong ?

回答 (1 件)

Jaimin
Jaimin 2024 年 10 月 9 日
編集済み: Jaimin 2024 年 10 月 9 日
Hi @PLR,
To resolve the error, one workaround is to use the Initialize Function block to assign a string value to theData Store Memory block. This works because the Initialize Function block is a preconfigured Subsystem block that executes during a model initialization event.
Kindly refer to the following images to understand how to use the "Initialize Function" block.
For more information on Initialize Function block kindly refer following MathWorks Documentation.
I hope this will be helpful.

カテゴリ

Help Center および File ExchangeString についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by