Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
How to ensure all timers in callback are started?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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).
0 Kommentare
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!