‎07-31-2005 08:34 PM
‎08-01-2005
04:38 PM
- last edited on
‎04-07-2026
11:16 AM
by
Content Cleaner
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
‎08-01-2005 04:47 PM
‎08-04-2005 08:15 AM
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.
‎08-04-2005 06:32 PM