DAQmxStopTask

NI-DAQmx C Functions

DAQmxStopTask

int32 DAQmxStopTask (TaskHandle taskHandle);

Purpose

Stops the task and returns it to the state it was in before you called DAQmxStartTask or called an NI-DAQmx Write function with autoStart set to TRUE.

If you do not call DAQmxStartTask and DAQmxStopTask when you call NI-DAQmx Read functions or NI-DAQmx Write functions multiple times, such as in a loop, the task starts and stops repeatedly. Starting and stopping a task repeatedly reduces the performance of the application.

Parameters

Input
Name Type Description
taskHandle TaskHandle The task to stop.

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.