Error in Simulink.Bus - Struct conversion

1 回表示 (過去 30 日間)
Simone Specchia
Simone Specchia 2021 年 2 月 10 日
回答済み: David Fink 2021 年 2 月 18 日
I have defined in a script a Simulink.Bus and I use it in a Simulink model with a C-caller block.
The C-caller function takes the bus as input, and uses its fields to compute some outputs.
I have defined in a header file a struct with the same fields of the bus I'm using, and I have included it in the C file used by the C-caller.
When I try to run the model it keeps showing me an error saying that the field 'HeaderFile' of the Bus must not be empty, but I already filled it with the name of the header file.
If I comment the C-caller block, run the model and then uncomment the C-caller, it starts working.
How do I remove the error?

採用された回答

David Fink
David Fink 2021 年 2 月 18 日
Please reach out to MathWorks Technical Support for assistance with this:

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by