Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple counter recording with NI9401

I am about to buy a NI9401 which will be connected to a NIcDAQ-9171. But I am now testing the NI9401 with a NicDAQ-9172.

My objective is to record simultaneous the position of 2 encoders (using 2 counters input of the DAQ). With the NIcDAQ9172 I have, there is only 2 counters; but there are 4 in the NIcDAQ 9171.

 

My problem is that, will it be possible to record both counters simultaneous with the NI9401, using the session based interface in Matlab. This is important to me because some NI engineer told me so, but testing with the NIcDAQ9172, i have problems to record only one encoder in the same time as a clock input (that seems to be necessary in order to measure counter position) : I obtain a message saying "the hardware associated with the session is reserved..." . I don't know how to proceed to solve this problem and I am afraid 

 that this could be the same with the NIcDAQ-9171.

 

 

Thanks for your help, because that will really be helpfull to be chure of my material choice.

 

 

 

 

 

0 Kudos
Message 1 of 3
(6,126 Views)

I wouldn't expect any different behavior between the 9171 and 9172 with regards to resource reservation.  

 

However... it is certainly possible to run multiple counter tasks on the same 9401 using DAQmx (which has LABVIEW, C, and .NET APIs).  I'm not familiar with the MATLAB API you're using though (is it the Data Acquisition Toolbox?).  You might try asking whoever owns the API that you are using for guidance.

 

It might be worth pointing out that the 9401 is somewhat peculiar in that it is the only C Series module with 8 bi-directional lines routed to the chassis in parallel.  Sometimes reservation issues come up with the 9401 due to this (there are only 8 parallel data lines between the chassis and the module in total, and the chassis wouldn't be able to configure line direction once certain lines are committed to a different task).  Resource reservation issues can be worked around by explicitly reserving all your tasks before committing/running any of them that might interfere with configuring line direction.  I'm not sure if / how this can be done in the MATLAB API.

 

 

Best Regards,

John Passiak
Message 2 of 3
(6,089 Views)

Thank you for your answer John_P1.

 

Indeed, I still have this reservation problem trying to use matlab. Thus I have decided to use the DAQmx, which seems more appropriate to overcome this problem.

 

Thank you for your help.

 

Jeff

0 Kudos
Message 3 of 3
(6,004 Views)