Solution
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:
- Referencing the same task twice, and attempting to start both before stopping one of them
- Placing a
DAQmx Start Task.vi
inside a while loop without stopping the previous instance of the task - Placing a
DAQmx Read.vi
or a DAQmx Write.vi
before a DAQmx Start Task.vi 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 Read.vi
is not called before the
DAQmx Start.vi
, as in the example below:

If a
DAQmx Start Task.vi
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 Task.vi
or
DAQmx Clear Task.vi
. 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.