From Workspace block using Data Dictionary
古いコメントを表示
How can I use a timeseries as a simulation input in a Simulink subsystem or model reference, when the model uses a Data Dictionary?
I tried using a 'From Workspace' block, which I think should be possible, since the documentation for the block has a section on Use with Data Dictionary. Here's what it says:
To access simulation input data, store the target variable in the base workspace and set the Data parameter by using a call to the evalin function. In the call to evalin, specify the ws argument as 'base' so that the block seeks the variable in the base workspace instead of the data dictionary. For example, if the name of the variable is myTimeseriesObject, set Data to evalin('base','myTimeseriesObject').
But, right after adding a 'From Workspace' block to my model a get a popup error message saying this:
This model cannot contain From Workspace block 'MyModelName/Input_Processing/From Workspace' because the model is linked to a data dictionary. For a test harness model, configure it to use the base workspace instead of a data dictionary. Otherwise, replace this block with a root Inport or other source block.
Thank you.
採用された回答
その他の回答 (2 件)
Arunkumar M
2018 年 11 月 9 日
0 投票
Even when model is linked to data dictionary, you can use evalin function to access variables which are defined in base workspace - refer attached image

-Other method is to create a referenced subsystem and pointing to the model which is linked to data dictionary and the reference subsystem can be linked to base workspace. Then the input from base workspace shall be propagated to the model linked to data dictionary
Thomas Kotwal
2018 年 11 月 9 日
0 投票
2 件のコメント
Arunkumar M
2018 年 11 月 10 日
No They are constant blocks? Do you specifically want to use From Workspace blocks?
Thomas Kotwal
2018 年 11 月 12 日
カテゴリ
ヘルプ センター および File Exchange で Interactive Model Editing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!