Info
此问题已关闭。 请重新打开它进行编辑或回答。
How to ensure all timers in callback are started?
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!