필터 지우기
필터 지우기

Stateflow: Output appears after some time/steps for a function call

조회 수: 1 (최근 30일)
I am using stateflow diagrams for a model and it is having multiple statecharts. The statecharts are having graphical functions and it is available globally. In one of the graphical functions, an output variable is changing. When I call this function, the output is changing after few seconds of time of execution. Example of function:
function StateSampleFunc(InputVar)
OutVariable = InputVar; %Weitten on transition
The InputVar is visible on the OutVariable after few seconds of calling the function StateSampleFunc.Is this expected for a bigger models having multiple statecharts and outputs?
  댓글 수: 2
TAB
TAB 2018년 5월 25일
Seems like implementation/logic issue. Not Stateflow problem. Where are you checking OutVariable ? On Scope ?
Can you share your model or part of model ?
Varunjith Vijayan
Varunjith Vijayan 2018년 5월 25일
I am checking on the simulation data inspector.

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

채택된 답변

Varunjith Vijayan
Varunjith Vijayan 2018년 6월 5일
The issue was with the sampling time used was different with the chart which is calling the function and the chart containing the function.

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by