IsRunning

Indicate if operation is still in progress

Description

When working with the session-based interface, the IsRunning status indicates if the operation is still in progress.

    Tip   IsRunning indicates if the operation is in progress, but the hardware may not be acquiring or generating data. IsLogging indicates that the hardware is acquiring or generating data. IsDone indicate is if the session object has completed acquiring or generating.

Values

true

When the value is true if the operation is in progress.

false

When the value is false if the operation is not in progress.

Examples

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

See Also

Properties

IsLogging, IsDone

Functions

startBackground

Was this topic helpful?