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

4 Ansichten (letzte 30 Tage)
Pranjal
Pranjal am 22 Dez. 2015
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.

Antworten (1)

Muthukumar Ganesan
Muthukumar Ganesan am 12 Aug. 2022
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.

Kategorien

Mehr zu Modeling finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by