State flow execution order
4 次查看(过去 30 天)
显示 更早的评论
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
回答(1 个)
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 个评论
Titus Edelhofer
2012-9-10
Hi Robert, your welcome. You might mark the question then as answered ;-).
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!