Is there a way to store large number of transition conditions in a Simulink block?

조회 수: 1 (최근 30일)
Hello all,
Could anybody suggest a way to store a large number of transition conditions in a Simulink block (or file)? I have a stateflow chart with large number of transition conditions at every state. I want to improve the readability and simplicity of my state chart.
Thanks in advance!
Cheers, Rashmi

채택된 답변

Ankita Nargundkar
Ankita Nargundkar 2017년 6월 21일
If your transition conditions looks something like [condition1 && condition2 && ..... conditionN] , you can place a MATLAB function block in the chart that evaluates all of those conditions and returns true or false. That function could then be called as the transition condition, simplifying the syntax greatly.
  댓글 수: 2
Rashmi Bharadwaja
Rashmi Bharadwaja 2017년 6월 22일
Hi Ankita,
Thanks for answering my question. When I try to include a Matlab function block in my stateflow chart, I get a "mxResult == 0" and I cannot save the function block editor script. Do you happen to know what the problem is?
Thanks a ton! :)
Rashmi Bharadwaja
Rashmi Bharadwaja 2017년 7월 11일
I found another solution to this problem. The tranition conditions can be implemented in a seperate subsystem and the output can be taken out as a flag. These flags from several conditions can be checked as a condition for transition.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by