How to check how many events/callbacks have been queued in Matlab

4 ビュー (過去 30 日間)
Tao Cui
Tao Cui 2017 年 3 月 30 日
コメント済み: Tao Cui 2017 年 4 月 25 日
I have a daq session that runs by startBackground(). It continuously samples analog channels and keeps firing an event and cause a DataAvailable callback whenever sampled data exceeds a pre-set size. However, sometime DataAvailable takes longer to execute, causing the event to be queued up. My question is:
Is there a way to check how many events are queued up?
Thank you!

回答 (1 件)

Sangeetha Jayaprakash
Sangeetha Jayaprakash 2017 年 4 月 4 日
It looks like you are trying to check how many scans are still queued after using "startBackground". Try using the functions 'ScansOutputByHardware' and 'ScansAcquired' below:
  1 件のコメント
Tao Cui
Tao Cui 2017 年 4 月 25 日
Thanks, what I want to do is more general: for example, I can trigger an event using "notify(h, eventname, eventdata)". Assume there is a listener function added to that event. To my understanding, if that event triggered too fast and too frequently for a short period of time, it will be queued up for the listener function to process in a callback fashion. I am asking, is there a way to check how many event has been queued up for the listener to process?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeData Acquisition Toolbox Supported Hardware についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by