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.
Value |
|
Description |
DAQmx_Val_Task_Start
|
|
Starts execution of the task. |
DAQmx_Val_Task_Stop
|
|
Stops execution of the task. |
DAQmx_Val_Task_Verify
|
|
Verifies that all task parameters are valid for the hardware. |
DAQmx_Val_Task_Commit
|
|
Programs the hardware as much as possible according to the task configuration. |
DAQmx_Val_Task_Reserve
|
|
Reserves the hardware resources needed for the task. No other tasks can reserve these same resources. |
DAQmx_Val_Task_Unreserve
|
|
Releases all previously reserved resources. |
DAQmx_Val_Task_Abort
|
|
Abort 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. |