フィルターのクリア

State flow temporal logic after(x,sec) only waits until x=simulation time. I need it to be event triggered.

11 ビュー (過去 30 日間)
Derrek
Derrek 2014 年 4 月 15 日
回答済み: Ravi 2020 年 4 月 30 日
I have used this temporal logic in the past with no problem, but for some reason it is not working for me now. I have a condition in StateFlow where I need to transition from one state to another when an input is transitioned from low to high with a timing requirement, or instantly when another condition is met.
[L_fireSwitch && after(6,sec) !L_genCont]
That's the transition statement. The logic works fine except the timing is only right if the simulation time is equal to the time specified. In this case 6 seconds. I need it to wait 6 seconds after L_fireSwitch is true before transitioning. Instead it only transitions to whenever L_fireSwitch is true and the simulation time is equal to or greater than the time I have specified.
  1 件のコメント
Lewis
Lewis 2019 年 1 月 15 日
編集済み: Lewis 2019 年 1 月 15 日
I have the same problem. Has anyone found a solution?

サインインしてコメントする。

回答 (1 件)

Ravi
Ravi 2020 年 4 月 30 日
Hi,
If I understand your problem statement properly "First-> L_fireSwitch should come true, then -> condition 'after(6,sec)' should become true". After all transition should takes place.
But problem in this condition([L_fireSwitch && after(6,sec) !L_genCont]) is works independently. That is after(6,sec) will start independently irrespective of L_fireSwitch.
So we should go for alternate approach as shown in attached image.

カテゴリ

Help Center および File ExchangeComplex Logic についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by