Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

More than one Counter function per channel

Hi
I am using a M series PCI-6229 DAQ card. I want measure the pulse width and count digital edges on both of the counter channels. Is it possible to do this or must I choose only one function per channel for a given session? Ideally I would like to read off the current pulse width and counter value for each channel at a constant rate.
 
Thanks for any help
Luke
0 Kudos
Message 1 of 5
(3,526 Views)
 
 

Hi Luke-

You will not be able to perform more than one operation at a time on a single counter- the reason for this is that most operations require connections on both input pins (i.e. gate and source) of the counter. 

For instance, counting edges requires the signal to be input on the source of the counter, but pulse width measurement requires that the master timebase be routed to the source.  Obviously these can't both be used at the same time.  So in short, no, you will not be able to perform more than one operation at a time on a single counter.

Your M Series card does feature two counters that can be used independently.  If you need more counters you may want to consider a specialty counter card such as the PCI-6602.

Thanks-

Message Edited by Tom W. on 08-01-2005 04:38 PM

Tom W
National Instruments
0 Kudos
Message 2 of 5
(3,513 Views)
Hi Tom,
Thank you for your reply, its not the news I was hoping for but it is good to know how these features operate. Purchasing another DAQ card is not an option for this project as we have only just got the 6229. I will have to figure out another way of doing this.

I am using both counters on the 6229 and require pulse width measurement and edge counting for both channels...ummm

Cheers
Luke
0 Kudos
Message 3 of 5
(3,510 Views)

Luke,

I can't give you all the details b/c I'm working from (faulty) memory -- my network PC isn't near my LV PC.  Here's an outline of a concept that may work for you:

1. Configure each counter for buffered pulse width measurement.  You do this by using the DAQmx Timing vi to define continuous sampling.

2. The basic idea now is that while you are measuring all the pulse widths that come into the counter, you can also keep track of how many pulse widths have been measured.  There's more than one way to do this.

3. In your "polling" loop, you can use one of the DAQmx property nodes to query the task for the # of available samples.  If large enough for your purposes, call DAQmx Read and ask for exactly that # of samples.  Add this # to your cumulative total of pulses.  Also, the most recent pulse width value(s) can be extracted from the end of the array returned by DAQmx Read.

4. Alternate approach:  There's a property node to query for "Total # samples acquired" that should directly tell you the total # of pulses at any given time.  It's possible to setup other property nodes to request only the single most recent pulse width measurement from the circular buffer as well.  This approach requires a bit more DAQ programming, but is probably a more efficient way to operate.

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 5
(3,495 Views)
Hi Kevin,
Thanks a lot for your suggestions. From what you are saying it seems I can do exactly what is required, its a great help!
I will have to investigate further to find exactly what is required to implement this in Matlab however it should be fine.

Thanks again
Luke
0 Kudos
Message 5 of 5
(3,488 Views)