DAQmxClearTask
int32 DAQmxClearTask (TaskHandle taskHandle);
Purpose
Clears the task. Before clearing, this function stops the task, if necessary, and releases any resources reserved by the task. You cannot use a task once you clear the task without recreating or reloading the task.
If you use the DAQmxCreateTask function or any of the NI-DAQmx Create Channel functions within a loop, use this function within the loop after you finish with the task to avoid allocating unnecessary memory.
Parameters
Input | ||
Name | Type | Description |
---|---|---|
taskHandle | TaskHandle | The task to clear. |
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. |