Cannot resolve a function called from a subsystem in Stateflow

2 ビュー (過去 30 日間)
Alexander Dingwall
Alexander Dingwall 2019 年 10 月 5 日
回答済み: Kavya Vuriti 2020 年 2 月 21 日
Hello,
I have two Simulink function blocks within a Stateflow chart. We'll call one A and one B. Simulink function B contains a variant subsystem inside of which I have another Stateflow chart. Inside this Stateflow chart, I have a call to the Simulink function A. When I try to run this model, it cannot resolve the call to function A. I don't understand why though since the function block A is within the parent system, so should it not be able to resolve it?
I've made a diagram illustrating what I mean.
Capture.PNG

回答 (1 件)

Kavya Vuriti
Kavya Vuriti 2020 年 2 月 21 日
Hi,
To use functions defined in one chart within another chart, chart-level functions must be exported. But it is possible to export only graphical functions, MATLAB functions or truth tables. I think you can try defining the function either as graphical or MATLAB function instead of simulink function.
Refer the following link to find more information on exporting stateflow functions:https://www.mathworks.com/help/stateflow/ug/exporting-functions-for-reuse-in-other-charts.html

カテゴリ

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