MATLAB Answers

What is the best way to implement Class Diagrams in Simulink&Stateflow ? What is the equivalent of classes representation in Stateflow?

6 views (last 30 days)
G36wox
G36wox on 31 Mar 2016
Commented: G36wox on 14 Apr 2016
Hey Matlab Community,
What is the best way to implement Class Diagrams in Simulink&Stateflow ?
What ist the equivalent of classes representation in Stateflow?
I want to create several instances of the same object for example: Instance green, red and yellow of the object SMLamp which also includes a StateMachine. Each of the 4 blocks in the following image also includes a StateMachine.
My task is to transform this UML class based model in the Stateflow &Simulink environment.
SMTrafficLight - Block
SMLamp -Block

  0 Comments

Sign in to comment.

Answers (1)

sam0037
sam0037 on 13 Apr 2016
Hi,
This link talks about Hybrid Software Development with Simulink and UML Tools. This video might be a good starting point to approach this issue.
Hope this helps. All the best!!!

  1 Comment

G36wox
G36wox on 14 Apr 2016
First of all thanks for having a look at my issue.
Although the video example shows the connection of UML arhitectures and Simulink , it doesnt provide any information about changing the development environment from a UML based program to Matlab Simulink Stateflow.
My problem consists in how to model class diagrams in Stateflow and what is an equivalent of classes illustration in the Stateflow environment.
Till now i thought about splitting every class and i have come to the following hierarchy:
Furthermore i have thought about creating a library in Simulink so i use the same object for every representation of green,red,yellow. However i encountered some problems and this might not be a viable solution.
If I wasn't clear enough presenting my current issue please let me know. If you can also direct me to some experts in Stateflow i would be very grateful.
Thanks in advance.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!