Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Measuring 4 counter inputs through NI 9401

Hi

 

I am counting 4 counter inputs using NI 9401.when i run them individually they run fine.But when I run them  together I get Error -201133 9(details given below) .I searched in NI forum and found this normally occurs when someone is trying to use NI 9401 both as input and output but I am using it as only input why I am having this issue.Please advise

 

 

 

Error -201133 occurred at DAQmx Start Task.vi:2

 

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.

Device: cDAQ1Mod2
Digital Port: 0
Lines: 4

Task Name: _unnamedTask<5A>

 

 

0 Kudos
Message 1 of 12
(10,773 Views)

Hi vnarang,

 

Running four counter input tasks on the NI 9401 should work, assuming that the module isn't already configured for output. It sounds like you used it for output before you tried to run the input tasks. The first input task successfully reconfigures one nibble from output to input, but one of the other input tasks fails to reconfigure the other nibble because the first input task is still running.

 

The error message explains how to work around this limitation of the NI 9401: use DAQmx Control Task to reserve all NI 9401 tasks before you commit any of the tasks. Here's a knowledgebase that links to examples of how to do this: Why Do I Get Error 201133 When Trying To Perform Bidirectional DI/O with My NI 9401 in DAQmx?

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 2 of 12
(10,759 Views)

Hi brad,Thanks a lot for the reply.I never used NI 9401 module for output i only used it for input.

Let me try what u have suggested.

 

Thanks and regards

Vikas

0 Kudos
Message 3 of 12
(10,751 Views)

Hi

 

sorry for sucha a late response to the thread.I am trying to acuire digital pulse using NI 9401 and I was getting error.I was advised to use control task and i did the same.Now I am able to acuire data from all four flowmeters.but now I am geting differnt counts than what I supposed to get.When I am running them individually i am getting write counts and when I am using control task and reserving all the task I am getting very hih counts,

 

Please help

 

 

0 Kudos
Message 4 of 12
(10,707 Views)

Hi vnarang,

 

Could you be more specific about what your program does and what the results are?

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 5 of 12
(10,701 Views)

Hi Brad

 

Thanks for your time. I actually trying to acquire flow thru four hall effect flow meters.Flow meters produce 330 pulse per gallon.I am using NI 9401 to acuire the digital input ,mounted on NI 9178 chassis.

 

Flow meters needs 5 v dc power supply and signal output from the flow meter is current sinking so I have connected a resistor between + 5 V and output signal of he flow meter.

 

I have attcahed the Vi which I am using to acquire the flow.I am getting error 201133. i am confused why I am getting this error as I am not using  NI 9401 bidirectional,For the time being I tried to reserve task(which doesnt make sense to me for the reason i am not using 9401 bidirectional still i am doing as getting error) using control max and I am not getting rite counts.Please help me in knowing why I am getting error 201133 even I am configuring NI 9401 for only input,seondly if I am using control task why I am not getting write counts,

 

I have attached vi for your reference.

 

Best regards

 

Vikas

0 Kudos
Message 6 of 12
(10,694 Views)