Questions tagged [stateflow]

StateFlow is a toolbox from MathWorks for development of state machines. For questions regarding the StateFlow interface from Kotlin's kotlinx.coroutines library, use the [kotlin-stateflow] tag instead.

Stateflow is an toolbox (extension) of Matlab from Mathworks. It is a commercial, and proprietary toolset.

Generally, Stateflow extends Simulink with the ability to design and test state machines. It is commonly used in control design, where algorithms can be either MATLAB scripts & formulas, Simulink blocks or embedded code (in the form of so-called S-functions).

Code generation is supported on the host platform, but for target code additional tools are required (such as Simulink Real-Time (previously known as real time Workshop) or Embedded Coder).

Advantages compared to software-only tooling (like IBM Rhapsody):

  • use with hardware (in the loop)
  • seamless integration with Simulink

Disadvantages compared to software-only tooling:

  • high license cost for code generation

Links:

131 questions
0
votes
1 answer

Search a Stateflow Chart or Transition by ID

I have the following warning in Stateflow with IDs of a Chart and a Transition. Warning: Chart #404 has an unconditional transition #383 that shadows the following transitions: #381 . You can also configure the diagnostic by clicking…
Clement J.
  • 3,012
  • 26
  • 29
0
votes
1 answer

FSM in a graphical function

Is it possible to put a state inside a graphical function? We know that we can make graphical functions in matlab. Can we build a FSM in a graphical function? Can we put states in graphical functions?
user3379482
  • 557
  • 1
  • 10
  • 21
0
votes
1 answer

Execute a Simulink model one step using command line

I have given a Simulink model which I am controlling from my C++ program. From the Matlab engine I want to run the Simulink one step at a time for all of my given input. How can I run the simulation from my C++ program one step at a time?
bhawesh
  • 1,310
  • 2
  • 19
  • 57
0
votes
1 answer

Matlab Function Block with error generated by Stateflow

I have been trying to use "Matlab Function" block for hours using very simple example from this link http://www.mathworks.co.uk/help/simulink/ug/creating-an-example-model-that-uses-a-matlab-function-block.html (see attached file), however I keep…
user2563812
  • 219
  • 1
  • 2
  • 12
0
votes
1 answer

Matlab Simulink with Stateflow chart not outputting in scope with warning

I have a Simulink model with a Stateflow chart with an outflow scope to output array/vector variables into. I am using the latest version of Matlab 2013a. This may have something to do with this warning when I run the simulation: Warning: The model…
heavy rocker dude
  • 2,271
  • 8
  • 33
  • 47
0
votes
1 answer

Multiple inputs to switches in MATLAB Simulink Stateflow

I want to model a turning light from a car. To this end, I need to specify the user input for the trigger. So far I have used two binary switches - one for the turning light right and one for the turning light left. But this does not satisfy my…
Icky
  • 1,055
  • 1
  • 12
  • 30
0
votes
1 answer

Generate code Simulink/Stateflow

I generate C++ code using Simulink; Simulink builds file.exe but it doesn't run. The problem is: the program can't start because libmx.dill is missing from your computer. Try reinstalling the program to fix this problem. By the way the file…
Deviltrigger
  • 63
  • 2
  • 12
0
votes
2 answers

How to change the value of simulink block during the simulation?

i have a constant block in a simulink model; i would like to change its value during the simulation when a particular event occurred in a stateflow chart. how can i do it?
Deviltrigger
  • 63
  • 2
  • 12
0
votes
1 answer

How to generate state flow diagrams from XML in Java?

I created webservice and I return the Response in XML format. What is the best Tool to generate State Flow diagram from XML file.? Free tools or libraries? Guide me!
Ameer
  • 600
  • 1
  • 12
  • 27
0
votes
2 answers

Modeling Microwave in Stateflow-Simulink - How to give cooking time as an input from the simulink?

I am trying to model a microwave in MATLAB's stateflow module. I have modeled states like on-off (microwave can be turned on/off). In 'on' state, I have sub-states like 'door open', 'door close' and 'cooking'. I have set conditions on transitions…
ShriPat
  • 3
  • 2
-1
votes
1 answer

Simulink Stateflow: add invariants to state

Hi I am creating a hybrid automata model using Stateflow. I was wondering if it's is possible to add invariants to a state?
Addie
  • 31
  • 1
  • 1
  • 4
1 2 3
8
9