Stateflow入門 ロボット掃除機

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

 Accepted Answer

Atsushi Ueno
Atsushi Ueno on 29 Aug 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

More Answers (0)

Categories

Find more on 複雑なロジック in Help Center and File Exchange

Products

Release

R2021a

Community Treasure Hunt

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

Start Hunting!