필터 지우기
필터 지우기

Which outport of stateflow block will provide the proper output data?

조회 수: 3 (최근 30일)
Dark_Knight
Dark_Knight 2023년 8월 30일
답변: Jerbin J 2023년 9월 15일
Using runtime object I found that for "sldemo_autotrans" model there are four OutputPorts.
But the correct output is obtained in the OutputPort(2).
Similarly,for "sldemo_fuelsys", model there are ten OutputPorts,the correct output is obtained in OutputPort(4).
Is there any provision in MATLAB to find the proper OutputPorts of a stateflow chart which would provide the exact answer as of stateflow chart?Because OutputPorts other than 2 and 4 in the above cases are providing answers but are not the same as of stateflow output which I verified using signal logging.

채택된 답변

Jerbin J
Jerbin J 2023년 9월 15일
open_system(modelName);
sf=sfroot;
chart=sf.find('-isa','Stateflow.Chart');
data=Stateflow.Data(ch);
data.Scope='Output';
% Port which provides correct output data
reqOpPort = data.Port

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by