Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Error -201133 in start Task

Good morning,
 
     I am using a cDAQ with 2x 9401 modules (slots 5&6) and 1x 9233 module (slot 4) attempting to record some vibration data from our machines. I have configured LV to programatically read the active device, detect these modules above and to 'adjust' the task according to slot # and device name. The sub VI 'CreateDIOTask' (attached) is responsible for these actions and creates 4 tasks as a result; the tasks are for engine speed (ctr0 mod5); wheel spd (ctr1 mod5); a DI line (P0.0 Mod 6); and a DO line (P0.4 Mod6). The CreateDIOTask sub seems to work (no errors when exectued alone) but when I run the top level VI (TLVI-031......, also attached) LV returns:
 
Error -201133 occurred at DAQmx Start Task.vi:4 
Possible reason(s):
 
Measurements: 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.
 
Device: Dev12Mod6
Digital Port: 0
Lines: 0
Task Name: TLVI-031_SeatPadAccelDO
 
Any help would be greatly appreciated.
 
Thanks,
Tom
0 Kudos
Message 1 of 3
(4,825 Views)
Hi Tom,

The NI 9401 is nibble configurable but it cannot be reconfigured while in use.  When you create an input task on line 0, it sets all 8 lines to input.  Changing the other nibble to be output requires stopping the input task.  This means if you have a task running on lines 0:3, you cannot reconfigure lines 4:7 until you stop and unreserve all lines. 

To configure the 9401 for both input and output, create your input and output tasks.  Then, before you start either task, reserve both tasks.  In Labview this is under  DAQmx Advanced Task Options->DAQmx Control Task.  Set the Action to reserve.  In the C API, this is DAQmxTaskControl (taskHandle, DAQmx_Val_Task_Reserve).

After both tasks have been reserved, you can start your tasks.  You could also reserve task1, start task2, and then start task1.
 

A similar question was asked here.
Message 2 of 3
(4,811 Views)

Hey Everybody,

 

Here's a great resource for the bidirectional nibble configuration of an NI 9401 with DAQmx.

 

KnowledgeBase: Why Do I Get Error 201133 When Trying To Perform Bidirectional DI/O with My NI 9401 i...

 

Be sure to check out the community examples linked in the KB.  I hope this helps!

 

- Greg J
0 Kudos
Message 3 of 3
(4,404 Views)