Why stateflow use different data according to entry
2 次查看(过去 30 天)
显示 更早的评论
Hi everyone ,
I use stateflow for gearshifting operation, but I have problem about it .
stateflow's inputs are throtte,engine rpm and
In stateflow I have some simulink function (Look up tables in it), which are determine gear situatiıon, Gear 1 2 3 4 etc.
When I read engine rpm from entry of stateflow and local stateflow engine rpms,(which is engine rpm) these values are different .
Entry of stateflow engine's rpm is less than in stateflow . Why I have this problem .
Although, engine rpm isn't reached critical rpm ,gear is changed (when we read from entry of stateflow engine rpm).
but, ın same process, When we read engine rpm from local of stateflow ,it is reached to critical rpm and gear is changed
Thank you for your help.
![](https://www.mathworks.com/matlabcentral/images/broken_image.png)
![](https://www.mathworks.com/matlabcentral/images/broken_image.png)
10 个评论
Ryan G
2013-1-9
It looks like you're using 12b. Instead of using the breakpoint, setup the Simulink stepper (the buttons next to the play button) to allow to rewind the model. Set it to pause at whatever time this happens at. Backstep to see if it matches before the transition. Forward step to see if the simulink model matches up later.
I suspect the issue may be that the model is 'in between' steps. That is to say the Stateflow model pauses the model before a full step has occurred in the solver and you are seeing different results. This is just an educated guess.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!