Simulink Coder external mode error: Simulink cannot upload data to xxx because one of its driving blocks is a top level inport

5 visualizaciones (últimos 30 días)
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?

Respuestas (1)

Hari
Hari el 10 de En. de 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:
  1. Add a Data Store Memory block to your model.
  2. Add a Data Store Write block connected to the inport that writes to the Data Store Memory.
  3. Add a Data Store Read block connected to the scope that reads from the Data Store Memory.
Refer to the documentation of Data Store Memory for more information on how to use it within your Simulink model:
Hope this helps!

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by