What are the different between startforeground and startbackground (Session-Based Interface)?

Hi,
I'm trying to use DAQ NI USB 6008. In help session, I found that 64bit MATLAB can import/export the data by using creatSession of my DAQ, then addAnalogInputChannel .
I wonder what are the different between startforeground and startbackground ?
I already try 2 of them, i'm placing startforeground in while loop to make it run all the time but the data has some delay. Then i try to use startbackground and set IsContinuous = true
Then i'm adding addlistener('DataAvailable', @event) but i'm not sure how this event work in the loop.
*Can i call the variables in the event out to my main editor page ?
And how the function(i mean loop) of addlistener and IsContinuous = true work ?
And if i want to measure the time when the data transfer where do i place tic and toc in case of startbackground ?*
Thanks,

1 件のコメント

Hsuan Tse Guo
Hsuan Tse Guo 2017 年 5 月 17 日
me 2 have some delay when I use startforeground.
It seem need more time than using start(AI). I would like to know is the problem of Matlab or something.

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeData Acquisition Toolbox についてさらに検索

質問済み:

2015 年 3 月 5 日

コメント済み:

2017 年 5 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by