I want to create a logic with Subsystems in Simulink like Stateflow without using state machine. What are the alternatives to Stateflow?

32 ビュー (過去 30 日間)
Hey everyone,
I want to create a logic with Subsystems in Simulink like a State Machine without using state machine. What are the alternatives to State machine? I would be happy, if you guys help me to this topic. Thanks a lot.
  7 件のコメント
Ihsan
Ihsan 2023 年 3 月 15 日
Yes, enabled subsystem might be a solution. Do you think, Multi Switch Port can be also used for this?
With "jump" I mean a system, which can be triggered through signals from other subsystems. And when the input signal ist not more 1 (True), it will be not more triggered.
Fangjun Jiang
Fangjun Jiang 2023 年 3 月 15 日
Use the approach suggested by @Oguz Kaan Hancioglu below, I think you can achieve activating and de-activating subsystems based on conditions. The transition action may be hard to implement but you may not need it.

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

回答 (1 件)

Oguz Kaan Hancioglu
Oguz Kaan Hancioglu 2023 年 3 月 15 日
You can use the switch case block in Port-Subsystem in Simulink Library. You can use the switch case block with the Switch Case action subsystem to make state machine in simulink enviment without Stateflow. You may need to keep in memory the state variable of your state machine.
As a reminder, simulink implements your state machine as a time based system. Stateflow is event triggered system. There is a difference.
Best
  3 件のコメント
Fangjun Jiang
Fangjun Jiang 2023 年 3 月 15 日
They are the same in terms of multiple choice. But since you need to activate/deactivate subsystem block, Switch-case is ready to be used with the action subsystem block.
Ihsan
Ihsan 2023 年 3 月 15 日
okay. That sounds good. I will try this.

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

カテゴリ

Help Center および File ExchangeSyntax for States and Transitions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by