State transition which needs to be triggered when a condition is met for a fixed period of time.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a state transition which needs to be triggered when a condition is met for a fixed period of time.
In the example below, the response I would like is for the transition from the on to the off state to occur when the input is == 1 continuously for 5 seconds. If, during the 5 seconds input becomes == 0 the state should remain on and the timer should reset. i.e. if input is ==1
again, it will wait for 5 seconds before transitioning to off.
![Query.PNG](https://www.mathworks.com/matlabcentral/answers/uploaded_files/204780/Query.png)
0 Kommentare
Antworten (1)
Muthukumar Ganesan
am 13 Aug. 2022
Hi,
Based on your implementation, adding a self transition with condition Input != 1, Please refer to the screenshot.
Thanks.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Complex Logic finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!