フィルターのクリア

How to a log analog input data from during background continuous acquisition ?

3 ビュー (過去 30 日間)
LO
LO 2018 年 7 月 19 日
編集済み: LO 2018 年 7 月 19 日
I am trying to save data recorded during a background acquisition. In theory, following the online help, one could add a listener to the session and direct its src/evt to a file. However, perhaps because the session start is in a loop, I can´t get it to work with two listeners (I am not even sure if 2 are actually allowed), as the same source ('DataAvailable') is already called by another function (Scope). Any idea on how I could fix it ?
%% Recording cycle for i=1:cycles s = daq.createSession('ni'); a1 = addAnalogInputChannel(s,'Dev2','ai0','Voltage'); a2 = addAnalogInputChannel(s,'Dev2','ai1','Voltage'); lh = addlistener(s,'DataAvailable',@scope); s.IsContinuous = true; s.startBackground; pause(duration); s.stop s = daq.createSession('ni'); a1 = addAnalogInputChannel(s,'Dev2','ai0','Voltage'); a2 = addAnalogInputChannel(s,'Dev2','ai1','Voltage'); o1 = addAnalogOutputChannel(s,'Dev2','ao0','Voltage'); queueOutputData(s,EOD); lh = addlistener(s,'DataAvailable',@scope); s.IsContinuous = true; s.startBackground; pause(playback_duration); s.stop; release(s); end

回答 (0 件)

カテゴリ

Help Center および File ExchangeData Logging についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by