Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

IsRunning

Indicate if session operation is in progress

Description

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.

Tip

  • 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.

Values

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.

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

Functions

Was this topic helpful?