Error Code -200479 When Running a Data Acquisition Program

Updated Oct 8, 2018

Reported In


  • LabVIEW


  • NI-DAQmx

Issue Details

I am using the DAQmx Start and DAQmx or DAQmx functions to acquire or generate data. When I run my program, I receive the following error message: Error -200479 Specified operation cannot be performed while the task is running


This particular error occurs when a task's state is set to Running when it is already in the Running state. There are three common scenarios where this error may show up:
  1. Referencing the same task twice, and attempting to start both before stopping one of them.
  2. Placing a DAQmx Start inside a while loop without stopping the previous instance of the task.
  3. Placing a DAQmx or a DAQmx before a DAQmx Start and setting Autostart to False.
You can avoid this error by starting and clearing the task outside of the While loop, and ensuring that the DAQmx is not called before the DAQmx, as in the example below.

If a DAQmx Start is placed inside a While loop without stopping or clearing the task, on every successive iteration of the While loop the task will attempt to start a task that is already Running. In order to avoid this, make sure that you stop or clear the task before it is restarted using the DAQmx Stop or DAQmx Clear Typically, starting and stopping the task outside of the While loop will avoid this error and improve driver performance as there are less state transitions taking place. 

Additional Information

Understanding the source of this error involves understanding the NI-DAQmx Task State Model. NI-DAQmx uses the Task State Model to improve ease of use and speed up driver performance. The Task State Model consists of five states: UnverifiedVerifiedReservedCommitted, and Running. For more information about the Task State Model refer to the Related Links.

When a task begins to perform an operation, the task transitions to the Running state. You can explicitly perform this transition by invoking the DAQmx Start, however, starting a task does not necessarily begin acquiring samples or generating data. It is important to note that if a DAQmx or DAQmx is called, it will automatically start the task and transition the task into the Running state. If the DAQmx Start is called after either one of these functions, it will be trying to start a task that is already in the Running state. In order to avoid this error, ensure that the DAQmx Start is not called after your task has begun acquiring or generating data.


Not Helpful