NI-DAQmx .NET Framework 4.0 API Reference

Content Type
Programming Language
Current manual
Table of Contents

Task.Control Method

Task.Control Method

TaskControl Method

Alters the state of the task according to the mode you specify.

Namespace:  NationalInstruments.DAQmx
Assembly:  NationalInstruments.DAQmx (in NationalInstruments.DAQmx.dll) Version: 20.7.40.49302

Syntax

public void Control(
	TaskAction mode
)
Public Sub Control ( 
	mode As TaskAction
)

Parameters

mode
Type: NationalInstruments.DAQmxTaskAction
The action to use to alter the state of the task.

Exceptions

ExceptionCondition
DaqExceptionThe NI-DAQmx driver returned an error.

Remarks

To start a task more quickly, set mode to Commit to program the hardware with all parameters of the task prior to starting it.

If the task is in the running state and an asynchronous read or write on the task is in progress, calling Control(TaskAction) to move the task out of the running state does not return until the data from the pending read or write has been transferred to or from the task buffer. However, if mode is Abort, then Control(TaskAction) does not wait for the asynchronous read or write callback methods to finish. The pending asynchronous call stops immediately and raises a DaqException.

See Also

Was this information helpful?