How can I make a transition when a variable does not change its value?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Camba
el 4 de Mayo de 2016
Editada: zhihui diao
el 26 de Mayo de 2016
I have a stateflow chart that has a signal from a signal builder block as its input. I want to have a transition between two states that when two conditions happen:
- The signal has its value below a threshold.
- The signal value has not changed by a factor of delta for T seconds
Does anyone have any idea how do I do that?
0 comentarios
Respuesta aceptada
Swarooph
el 4 de Mayo de 2016
One way to do this would be to use some sort of an intermediate state to toggle between the condition. See screenshot at the end of the post.
For (1) use a < symbol and a threshold value. Use the OR operator ('||') to check for an interval.
For (2) use a temporal logic such as after: http://www.mathworks.com/help/stateflow/examples/using-absolute-time-temporal-logic.html?searchHighlight=temporal
e.g. screenshot of logic below:
0 comentarios
Más respuestas (1)
zhihui diao
el 26 de Mayo de 2016
Editada: zhihui diao
el 26 de Mayo de 2016
or you can build a time counter inter the second state use "during" sytax
0 comentarios
Ver también
Categorías
Más información sobre Complex Logic en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!