How can I change the Debounce time in Stateflow?

4 次查看(过去 30 天)

回答(1 个)

Fangjun Jiang
Fangjun Jiang 2023-10-11
编辑:Fangjun Jiang 2023-10-11
Typically, the value "5" in the two "after(5,sec)" statements is the time that the switch state needs to stay (without bounce) before it permently becomes "On" or "Off " state. You can change the value direcyly there or use a variable.
5 seconds sounds really long for a switch debounce. Mostly common ones are less than 1 second. after(800,msec)
Or, it could be a "press and hold" button. Press and hold for more than 5 seconds to turn it on. Press and hold for more than 5 seconds to turn it off.

类别

Help CenterFile Exchange 中查找有关 Complex Logic 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by