- Add a Data Store Memory block to your model.
- Add a Data Store Write block connected to the inport that writes to the Data Store Memory.
- Add a Data Store Read block connected to the scope that reads from the Data Store Memory.
Simulink Coder external mode error: Simulink cannot upload data to xxx because one of its driving blocks is a top level inport
5 次查看(过去 30 天)
显示 更早的评论
I have one inport connected to the scope, and I generated the code and run it in external model. I got this error below, and the scope is not showing any results. I cannot find any answers from the internet. Did I do anything wrong? What is the general suggestions?
0 个评论
回答(1 个)
Hari
2024-1-10
Hi Tao Cui,
I understand that you are encountering an error with Simulink Coder's external mode stating that Simulink cannot upload data because one of its driving blocks is a top-level inport.
To troubleshoot the error you can use Data Store Read and Data Store Write blocks to pass data between the inport and the scope.
Here's how you can implement the Data Store Memory method:
Refer to the documentation of Data Store Memory for more information on how to use it within your Simulink model:
Data Store Memory Documentation - https://www.mathworks.com/help/simulink/slref/datastorememory.html
Hope this helps!
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!