- Is the appdesigner GUI running in the same thread of timer-objects or command-line exec thread?
- OR Is the appdesigner GUI running raising some wait-to-complete flag (semaphores/mutex, whatever you are using) to pause the timer objects or the command-line exec thread?
Timer is interrupted, but only sometimes, by other functions
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have an application with a GUI which needs, among other things, to communicate via a serial port with hardware A and hardware B (two different ports).
This timer is created at the start of the application and assigned the function to be run every cycle. That function, communicates with hardware A, just to get the state of a sensor.
The timer is never interrupted when the application is running by anything I do. I can use the application normally, and the timer will ask the state of the sensor to hardware A every second (or another perior I set).
However, if click the button with a callback that makes a request from hardware B (get some data), then the timer function waits for that callback to be finished before it continues running.
Can anyone explain why this happens?
2 comentarios
Gilberto Pin
el 27 de Nov. de 2020
Editada: Gilberto Pin
el 27 de Nov. de 2020
Dear riverCN, I had the very same problem with GUIs written in appdesigner. This misbehavior was not affecting GUIs written in guide. It seems that the GUI callback, end even updates of graphical objects, in appdesigner blocks the execution of timers that instead are supposed to run in background (or in another thread). Two questions for the development team of Mathworks:
This is really annoying, indeed
Respuestas (0)
Ver también
Categorías
Más información sobre MATLAB Mobile Fundamentals en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!