- 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
6 views (last 30 days)
Show older comments
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?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1041080/image.png)
0 Comments
Answers (1)
Hari
on 10 Jan 2024
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 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!