Stateflow transition with timer

17 visualizzazioni (ultimi 30 giorni)
PaoloC
PaoloC il 6 Giu 2016
Risposto: prashant chavan il 26 Ott 2017
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 Commento
Daniel Lengauer
Daniel Lengauer il 18 Ott 2017
I am looking for the same solution. Is there a suggestion to solve this in only two states ?

Accedi per commentare.

Risposte (1)

prashant chavan
prashant chavan il 26 Ott 2017
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

Categorie

Scopri di più su Decision Logic in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by