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!