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

3 visualizaciones (últimos 30 días)
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!

Respuestas (0)

Categorías

Más información sobre Complex Logic en Help Center y File Exchange.

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