Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

How to ensure all timers in callback are started?

2 visualizaciones (últimos 30 días)
Manuel Thomet
Manuel Thomet el 1 de Jun. de 2015
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
I have a GUI which has a button to start three timers (t1, t2, t3). The purpose is to get data from an external device. The timer functions store the data (t1), plot the lines (t2) and update the axes (t3) at given times.
Now my problem is, that for some reason the skript "remains" in the second timer (t2) function and never comes back to the pushbutton callback to start the third timer (t3).
I tested this behavior, and found that with very simple timer functions it works fine (i.e. all timers start). The 'BusyMode' is set to 'queue' and 'ExecutionMode' to 'fixedRate'.
So my assumption is that if a timer function takes longer to execute than the subsequent timer firing, Matlab is forced to remain in this timer function, without the capability to execute any other task in the skript (e.g. start t3).
Can somebody confirm this or point me to a solution to ensure that all timers are started?
-> I tried "parfor" with the idea to start the timers parallel. No success because i had no interaction with the GUI any more (timers were all started, but no updates in the GUI happened).

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by