how to call a function from stateflow within model reference block.

I have created an integrated model with using Model reference blocks.I need to call a common function in all the referenced blocks on a transition of stateflow. How and where should I define the function so that it can be used with in all the stateflow charts in respective Model reference blocks.Please help.

답변 (1개)

Muthukumar Ganesan
Muthukumar Ganesan 2022년 8월 12일

0 개 추천

Hi,
You can define the common function in the top level model as simulink function, configure its visibility to "Scoped".
In the referenced model, the simulink function can be accessed in state machine by <TopModelName>.<SimulinkFunctionName>
Please refer to this for more details.
Thanks.

카테고리

도움말 센터File Exchange에서 Stateflow에 대해 자세히 알아보기

질문:

2015년 12월 22일

답변:

2022년 8월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by