该内容不适用于您选择的语言

该内容将以另一种语言显示出来。 您可使用浏览器的翻译功能查看内容。

Error -201133 in LabVIEW When Running Multiple Digital Output DAQmx Tasks

Updated Oct 23, 2023

Reported In

Hardware

  • C Series Digital Output Device

Software

  • LabVIEW

Driver

  • 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 do I see error -201133 when using my NI-9401 module and how can I configure it to use multiple DIO or counter tasks?
  • I read that I can create parallel DAQmx Tasks for my DO lines, so why am I getting an error in LabVIEW?
  • My NI-9476 module produces error -201133 at DAQmx Start Task. How can I resolve this?

Solution

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 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 running 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

If Using the NI-9401:

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.