Does the use of latency in statflow state work as expected?

6 次查看(过去 30 天)
Hi, I have a problem with stateflow, which is if I use a delay function in the state to execute two sentences, does that delay function work?
Because the compilation prompted me to delete, so I hope you help me,thanks!
This temporal logic expression has no side-effect. It either needs to be used in an expression, or removed if deemed unnecessary. State 'init' in Chart 'BLDDPM_cpu1_CCP_V1_0_20190818/extraControl/Protect_Logic': after(1,sec)
aftersec.png

采纳的回答

Jonas
Jonas 2019-8-19
编辑:Jonas 2019-8-19
Your state expression will not work indeed. You will need to create an additional state where ProtectStartBit = uint16(1); which has a state transition leading towards it with the condition after(1,sec);.
  5 个评论
Jonas
Jonas 2019-8-19
Stateflow does not work that way, all expressions within one state are executed each sample time when active. You need to separate the expressions in separate states.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Complex Logic 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by