Coder error when generating stateflow-code

Hi,
When I try to simulate a stateflow-chart in Simulink, I receive the error
"Error using sf Error using construct_error (line 109) Failed to create file: ....*sfun_debug_macros.h"
The simulink-model uses signals defined by bus-objects. The bus-object are created via in a s-function, where a c-struct is transformed or interpreted to fit the bus-objects. Thus, the same headerfile in which the bus-ojbects are defined is imported via the "Simulation target->Custom code".
What does this problem mean?
Each functin haves been tested separatley but when I add the stateflow chart the model can no longer be simulated. Are there any limitations on the staeflowchart that I´m not aware of? The s-functions can be compiled without any error and the signals and the output from the s-functions are correct. Any help is much appreciated. Thank you!

2 件のコメント

Kaustubha Govind
Kaustubha Govind 2011 年 10 月 24 日
Are you able to run any models with Stateflow, or is the problem with this specific model? Perhaps you could try running a demo like "sf_car"?
Pär
Pär 2011 年 10 月 27 日
Thank you for your comment.
The problem resided in something I´d overlooked.

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

 採用された回答

Pär
Pär 2011 年 10 月 27 日

0 投票

Problem solved, the solution was partly to move the model to higher level in a map structure and partly to define new bus objects.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink Coder についてさらに検索

質問済み:

2011 年 10 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by