Indicate if session operation is in progress
The read-only IsRunning
property indicates the session operation is
started and in progress, whether or not the hardware is acquiring or generating data at the
time.
IsRunning
indicates the session has started, but the hardware
might not be acquiring or generating data. It is still true while the hardware is
waiting for a trigger, and while transferring data in the process of stopping.
IsLogging
indicates the hardware is actively acquiring or
generating data.
IsDone
indicates the session object has completed its
operation, including all necessary transfer of data.
true
Value is logical 1
(true
) while the session operation is
in progress.
false
Value is logical 0
(false
) while the session operation
is not in progress, that is, before it starts or after it stops.
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.
s.IsRunning
ans = 1
Wait until operation completes and see if session is in progress.
wait(s) s.IsRunning
ans = 0