reducing execution of addlistener callback loop

2 visualizaciones (últimos 30 días)
Ashley Dalrymple
Ashley Dalrymple el 6 de Nov. de 2014
Comentada: Geoff Hayes el 7 de Nov. de 2014
I am running a callback function using addlistener, and no matter what it is in the callback function it loops the every 100ms (or 10Hz). Is there a way to speed this up to say 50Hz (or looping every 20ms)? I'm guessing this is inherent to addlistener. The data collection is very fast but the callback function has an algorithm for decision making and with it taking 100ms to execute every time slows down my whole system.
  1 comentario
Geoff Hayes
Geoff Hayes el 7 de Nov. de 2014
Ashley - it sounds like you may want to optimize the code in your callback function. Can you post the code? Have you verified that callback function responds to the data collection at a faster rate if there is no decision-making functionality, just to determine if this code is the cause of the performance degradation?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre App Building 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!

Translated by