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

조회 수: 6 (최근 30일)
Pranjal
Pranjal 2015년 12월 22일
답변: Muthukumar Ganesan 2022년 8월 12일
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일
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.

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by