Does the use of latency in statflow state work as expected?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Xu Liu
el 19 de Ag. de 2019
Comentada: Xu Liu
el 19 de Ag. de 2019
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](https://www.mathworks.com/matlabcentral/answers/uploaded_files/234424/aftersec.png)
0 comentarios
Respuesta aceptada
Jonas
el 19 de Ag. de 2019
Editada: Jonas
el 19 de Ag. de 2019
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 comentarios
Jonas
el 19 de Ag. de 2019
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.
Más respuestas (0)
Ver también
Categorías
Más información sobre Complex Logic en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!