How can I start a timer when the value of a signal becomes zero?
2 次查看(过去 30 天)
显示 更早的评论
I want to start a counter when the value of a signal becomes zero.
After that, when the time in the timer becomes 2 sec, I need to change a flag status.
I need help in doing these in simulink.
Thanks,
0 个评论
回答(1 个)
Guy Rouleau
2013-11-17
Use Stateflow... it allows you to express this type of procedural logic in a very intuitive way.
If you need to use Simulink only, then a combination of basic math (Sum, Switch, Delay, etc) will do it.
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!