Error -201133 in LabVIEW With NI 9401 When Running Multiple DAQmx Tasks

Updated May 8, 2020

Reported In


  • NI-9401


  • LabVIEW


  • NI-DAQmx

Issue Details

When I try to run multiple Digital I/O (DIO) or counter tasks in LabVIEW using NI-DAQmx, I get the following error:
Error -201133
Possible reason(s):

Device cannot be configured for input or output because lines and/or terminals on this device are in use by another task or route. This operation requires temporarily reserving all lines and terminals for communication, which interferes with the other task or route.

If possible, use DAQmx Control Task to reserve all tasks that use this device before committing any tasks that use this device. Otherwise, uncommit or unreserve the other task or disconnect the other route before attempting to configure the device for input or output.

Why is this happening and how can I configure my 9401 to run multiple DIO or counter tasks?


This error occurs because digital lines on the device are being reserved in the wrong order due to the execution timing of LabVIEW. In order to avoid seeing Error -201133 when configuring the NI 9401 in NI-DAQmx for multiple DIO or counter tasks, all tasks but one must be reserved. Subsequently, the unreserved task must be started first, as seen below.

Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project. To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW diagram.
In this case, two digital tasks and one counter task are being run simultaneously. Two tasks are put into the reserved state by using DAQmx Control Task. Then, the one unreserved task is started prior to starting the two reserved tasks.

If you need hardware timing, or another configuration, you can use the DAQmx Timing VI before you reserve or start any tasks.

Additional Information

The lines for the 9401 have to be configured as an input or output by nibble and not by individual line. This means that whether you are using counter or DIO tasks, lines 0-3 (nibble 0) must all be configured together as either input or output and lines 4-7 (nibble 1) must all be configured together as either input or output.

If the default PFI line for the counter output resides on a digital input nibble, an error will occur in the NI-DAQmx Start Task VI for the digital input task due to nibble 0 already being reserved for a counter output task. This can be avoided by using a NI-DAQmx Channel Property Node to specify a PFI line on nibble 1 for the counter output.

See Configuring an NI 9401 for Bidirectional DI/O By Nibble with DAQmx for an example demonstrating the bidirectional configuration and the capability to independently control the execution timing of each nibble.

See Configuring Nibble DI/O Configuration for Triggering with NI 9401 for an example utilizing the nibble configuration to trigger an analog task.