int32 DAQmxCreateTask (const char taskName[], TaskHandle *taskHandle);
Creates a task. If you use this function to create a task, you must use DAQmxClearTask to destroy it.
If you use this function within a loop, NI-DAQmx creates a new task in each iteration of the loop. Use the DAQmxClearTask function within the loop after you finish with the task to avoid allocating unnecessary memory.
Input | ||||
Name | Type | Description | ||
---|---|---|---|---|
taskName |
|
Name assigned to the task.
|
||
Output | ||||
Name | Type | Description | ||
taskHandle |
|
A reference to the task created in this function. |
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. |