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 Center および File ExchangeModeling についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by