Stateflow入門のロボット掃除機の所で解答と同じコードを入力しているのですがなぜかクリアすることが出来ないので、解決方法を教えていただきたいです。

 Réponse acceptée

Atsushi Ueno
Atsushi Ueno le 29 Août 2021

1 vote

{SOC<30}と書くと「SOC<30」が「条件として判断」されません。
[requestMode==1||complete==1]を満足し遷移する時に「SOC<30」が「実行」されてしまいます。
[requestMode==1||complete==1 ********]の様に波括弧を使わず、角括弧の中にSOCの条件判断を含めるべきです。
>遷移ラベルは全体として次のような形式を取ります。
event_or_message[condition]{condition_action}/transition_action

Plus de réponses (0)

Catégories

En savoir plus sur Stateflow dans Centre d'aide et File Exchange

Produits

Version

R2021a

Community Treasure Hunt

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

Start Hunting!