Indicate if operation is still in progress
When working with the session-based interface, the IsRunning status indicates if the operation is still in progress.
Create an acquisition session, add a DataAvailable event listener and start the acquisition.
s = daq.createSession('ni'); addAnalogInputChannel(s,'cDAQ1Mod1','ai0','voltage'); lh = s.addlistener('DataAvailable', @plotData); function plotData(src,event) plot(event.TimeStamps, event.Data) end startBackground(s);
See if the session is in progress.
ans = 1
Wait until operation completes and see if session is in progress:
ans = 0