Stateflow transition with timer

조회 수: 17 (최근 30일)
PaoloC
PaoloC 2016년 6월 6일
답변: prashant chavan 2017년 10월 26일
Hi all, I'm trying to design a stateflow chart and I've those requirements:
  1. Move from state A to state B if incomming signal (T) from Simulink is up a threshold for at least 10 seconds (Time out expired).
  2. if (T > threshold) but not for 10 sec THAN reset the timer and still in A
  3. if next time that T > threshold , the timer restart from 0
I would design the chart with only two state (A and B) and describe the timer condition on transition link, but I don't found a solution. Any suggestion?
Thanks !!!
  댓글 수: 1
Daniel Lengauer
Daniel Lengauer 2017년 10월 18일
I am looking for the same solution. Is there a suggestion to solve this in only two states ?

댓글을 달려면 로그인하십시오.

답변 (1개)

prashant chavan
prashant chavan 2017년 10월 26일
1. Use counter as input which will increment continuously outside the state 2. Add transition from A to B : condition (T > threshold) && counter > 10 sec action : timer reset to 0

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by