NI-DAQ™mx C Reference

DAQmxTaskControl

int32 DAQmxTaskControl (TaskHandle taskHandle, int32 action);

Purpose

Alters the state of a task according to the action you specify. To minimize the time required to start a task, for example, DAQmxTaskControl can commit the task prior to starting.

Parameters

Input
Name Type Description
taskHandle TaskHandle The task used in this function.
action int32 Specifies how to alter the task state.
ValueDescription
DAQmx_Val_Task_StartStarts execution of the task.
DAQmx_Val_Task_StopStops execution of the task.
DAQmx_Val_Task_VerifyVerifies that all task parameters are valid for the hardware.
DAQmx_Val_Task_CommitPrograms the hardware as much as possible according to the task configuration.
DAQmx_Val_Task_ReserveReserves the hardware resources needed for the task. No other tasks can reserve these same resources.
DAQmx_Val_Task_UnreserveReleases all previously reserved resources.
DAQmx_Val_Task_AbortAbort is used to stop an operation, such as Read or Write, that is currently active. Abort puts the task into an unstable but recoverable state. To recover the task, call Start to restart the task or call Stop to reset the task without starting it.

Return Value

Name Type Description
status int32 The error code returned by the function in the event of an error or warning. A value of 0 indicates success. A positive value indicates a warning. A negative value indicates an error.

Log in to get a better experience