State Machine v/s Flow Chart.

44 visualizaciones (últimos 30 días)
Vishal Shukla
Vishal Shukla el 19 de Jun. de 2019
Respondida: Tomasz Karczmarski el 18 de Nov. de 2020
What is the difference between State Machine and Flow Chart in SateFlow ?

Respuestas (2)

stozaki
stozaki el 9 de En. de 2020
Hello,
State machine is sequential decision logic and flow charts is combinatorial logic.
Please refer to the following documents.
Finite State Machine Concepts (MathWorks document)
Flow Charts in Stateflow (MathWorks document)
Regards,

Tomasz Karczmarski
Tomasz Karczmarski el 18 de Nov. de 2020
If I tried to summarize stozaki's answer in a few sentences, it would go like this:
The main difference between flow chart and state machine is that flow charts represent an algorithm that will run from beginning to the end in one simulation step, while state machine contains temporary states that are reached during execution of the step, and represent the outcome of logic encoded in the state machine for that particular step. Upon commencing the next simulation step a flow chart will run again from the beginning to the end, consuming current inputs and computing outputs with no regard to what it computed before, while a state machine will resume from the state in which it ended up in the previous step and it will advance to another state (or stay in the same one) depending on current input, the logic programmed into the machine and the context in which it was put by previous inputs. That makes state machines well suited to model control systems.

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by