Call external functions from Stateflow without halting system during function execution?

1 次查看(过去 30 天)
Hello Matlab Community,
I'm currently tweaking a Simulink/Stateflow control algorithm to interact with a real robot using UDP messages.
In order to send a motion command to the robot or to query the current position of one of its axis, a Matlab function is called from a Stateflow state. An inherent problem of using UDP in this context are occasional time delays in the message transfer, which in turn prolong the execution time of the respective Matlab function.
This leads me to my question: If I'm not mistaken, a Matlab function called from a Stateflow state needs to be executed within one time step and up until this function has finished, the entire stateflow system is halted.
Is there a way of calling a Matlab function from stateflow that possibily needs several time steps to finish and then continue working with the return values of that function within Stateflow? (While waiting for the function to finish, the rest of the stateflow system should continue working)
Any help would be greatly appreciated... Thanks in advance!

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Stateflow 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by