Are there other timer predicates than after() and before() in Simulink finite state machines?
Mostrar comentarios más antiguos
I am currently learning how to model timed finite state machines with Stateflow.
I understand from the documentation that the only conditions available on a transition w.r.t. to timers (such as before(), after() and at()) all refer to the time elapsed since the originating state of the transition on which the timer is present was entered.
Is is possible to start a timer say in state A, let the timer run over several states, and check later in a state B if the value of the timer is greater or lower than a threshold?
Thanks,
Arnaud
Respuesta aceptada
Más respuestas (2)
Siddharth
el 10 de Abr. de 2013
0 votos
Assign the simulation time to a variable when you enter state A (y1), then assign the simulation time to another variable in state B (y2). Subtract the 2 variables (y2 - y1). To get the simulation time from the beginning of the simulation, choose the approach based on the action language that you are using from the last entry in the table below:
Arnaud Dury
el 12 de Abr. de 2013
0 votos
1 comentario
Ryan G
el 12 de Abr. de 2013
If you get it to work, then you are interpreting me correctly! I tried this out and Siddharth let me know that simulation time was the other option. I used both methods and they both work.
Categorías
Más información sobre Stateflow Charts en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!