Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

simultaneous counting on two counters using PCI 6259

Hi All,
 
I am trying to solve the following problem and would greatly appreciate any help.
 
I need to count the output from two photodetectors (APDs) with a time stamp. APDs provide TTL pulses. Ideally I would want to count the number of pulses acquired within each microsecond, store the result and do this for a finite number of times (e.g. 5e+5 times). I want to store two APD outputs in this fashion. My DAQmx card is PCI 6259 and I am using Labview 7.0.
 
I have tried the example vi called "Count Digital Events-Buffered-Finite-Ext Clk.vi". Using this example I can count in one counter without a problem. When I modify this program to count in two counters simultaneously I get the error 89137: "Specified route cannot be satisfied, because it requires resources that are currently in use by another route."
I don't know much about DAQmx so my problem can have a pretty trivial solution. I am attaching my simple .vi program to this message. I would greatly appreciate any help.
 
Thank you.
0 Kudos
Message 1 of 4
(3,432 Views)
Hi,
 
When you perform a buffered finite count events operation, the DAQ board needs to utilize two counters.  The first counter does the actual counting of the signal you are trying to measure.  The second counter counts the number of buffers you have acquired so it can stop after the specified amount (finite).  Since you are using both of your board's two counters for this, there are no counters left for your other channel.
 
However, there is a solution to this.  Instead of performing buffered finite count events, you should use the buffered continuous count events example.  Since it is continuous, there is no need to count how many buffer's you've read and the task will therefore only use one counter.  This way you can have two counters for two signals.
 
Since you want it to be finite, I would suggest that you do a software check to see how many times you've read the counter.  Once the desired number is reached, call the DAQmx Stop Task to stop the continuous acquisition. 
 
-Sal
0 Kudos
Message 2 of 4
(3,417 Views)

Hi,

Sorry about my above post.  The information I had given was technicaly incorrect.  I had said that finite buffered event counting used two counters.  That was incorrect.  I had gotten it confused with finite pulse train generation.  Finite pulse train generation uses two counters, but finite buffered event counting only uses one counter.

So you should be able to use both counters for finite buffered event counting with no problems.

I took your posted VI and modified it.  It is now working on my system.

 

-Sal

0 Kudos
Message 3 of 4
(3,406 Views)

Thank you for the information Salvador. I beleive we have solved our problem with external triggering. Now we use triggered counting with an external trigger, we can simultaneously count on both counters this way.

We could have also used buffered edge counting but I think that would not change much because in that case we also need an external sample clock.

 

Best regards,

Alper Kiraz

0 Kudos
Message 4 of 4
(3,387 Views)