필터 지우기
필터 지우기

State transition which needs to be triggered when a condition is met for a fixed period of time.

조회 수: 1 (최근 30일)
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 ==1Query.PNG again, it will wait for 5 seconds before transitioning to off.

답변 (1개)

Muthukumar Ganesan
Muthukumar Ganesan 2022년 8월 13일
Hi,
Based on your implementation, adding a self transition with condition Input != 1, Please refer to the screenshot.
Thanks.

카테고리

Help CenterFile Exchange에서 Complex Logic에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by