While simulating model in Simulink I got error as "External input specified in the Configuration Parameters dialog box on the Data Import/Export page (or as an option to SIM command) to a model containing no root level input ports"

 採用された回答

Fangjun Jiang
Fangjun Jiang 2022 年 8 月 19 日

3 投票

You specified input data, but there is no root level input ports, which means no input data is needed.
If you've done this manually or inadvertently, press Ctrl+E, select "Data Import/Export" on the left, un-check "Input" on the right.

7 件のコメント

Abhijeet Anand
Abhijeet Anand 2022 年 8 月 22 日
Thank You
Param
Param 2023 年 2 月 3 日
What should I do if I actually need input data for my Simulink model from the base workspace, and I'm still receiving the same error?
Basically, I'm generating a cosine wave (u) in MATLAB, using a Time vector (tout) that was generated by a simulink model (model_A, say). I want to send this cosine wave to another Simulink model (model_B, say) for further processing.
Here's my MATLAB script:
% tout is a variable generated in the same workspace, from simulink model_A
u=cos(tout);
sim('model_B');
Command Widow Error:
External input specified in the Configuration Parameters dialog box on the Data Import/Export page (or
as an option to SIM command) to a model containing no root level input ports
Thanks.
Fangjun Jiang
Fangjun Jiang 2023 年 2 月 3 日
編集済み: Fangjun Jiang 2023 年 2 月 3 日
In this case, you need to have a root level Inport block. Then in model Configuration Parameters, Data Import/Export, check Input, [tout,u].
This is as if you are connecting the base workspace data [tout, u] to the root level Inport block.
Another way is to use a "From Workspace" block in the model and specify the data as [tout, u]. Then you don't need the Inport block.
Param
Param 2023 年 2 月 4 日
Thanks for the response @Fangjun Jiang.
I was actually using the "From Workspace" block since the beginning and had infact put the same input configurations [tout, u]. I had also specified the same in the "Data Import/Export page" of the model configurations, still I was getting the error.
However, I tried using the inport block, and it worked just fine.
Thanks a lot for your help.
madhan ravi
madhan ravi 2023 年 11 月 21 日
+1
Kamal
Kamal 2024 年 7 月 5 日
移動済み: Fangjun Jiang 2024 年 7 月 6 日
External input specified in the Configuration Parameters dialog box on the Data Import/Export page (or as an option to SIM command) to a model containing no root level input ports
how can i do
Fangjun Jiang
Fangjun Jiang 2024 年 7 月 6 日
Add an Import block to the root level of your model

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSave Run-Time Data from Simulation についてさらに検索

製品

リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by