State flow execution order

조회 수: 4 (최근 30일)
Robert
Robert 2012년 9월 7일
Hi,
I have a state chart whos purpose is to manage when to excecute some simulink functions. I am new to using stateflow, so maybe this answer to this question is self evident. Anyways, in one state the model is supposed to call two (simulink) functions, and their order of execution is important. I have used events to do this as follows:
Running
en:
stateFlag = 3;
du:
send(do_fcn1);
send(do_fcn2);
This model is suposed to run on a hardware platform in the end and my question is simply: Will the order in which I send out the events guarantee that fcn1 is called and completed before fcn2 when the code is compiled?
Regards, Robert
  댓글 수: 2
Azzi Abdelmalek
Azzi Abdelmalek 2012년 9월 7일
what event are you talking about?
Robert
Robert 2012년 9월 7일
Oh, maybe that was a bit unclear. The events (output to simulink) are 'do_fcn1' and 'do_fcn2'

댓글을 달려면 로그인하십시오.

답변 (1개)

Titus Edelhofer
Titus Edelhofer 2012년 9월 7일
Hi Robert,
yes it is: since your function calls do_fcnx trigger an atomic subsystem, the atomic subsystem will be simulated (entirely) one after the other.
Titus
  댓글 수: 2
Robert
Robert 2012년 9월 7일
Thanks Titus, that pretty much answers it :)
Titus Edelhofer
Titus Edelhofer 2012년 9월 10일
Hi Robert, your welcome. You might mark the question then as answered ;-).

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by