Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

counter timer recording memory

I have a USB-6289. I am presently using it as a counter. I want to do the following. I want to record the counts in memory at a rate of 400Hz. I want to be able to store this data in memory for 10 minutes. At the end of this time I would retrieve these counts and store them in a file. I do not think the USB-6289 has this capability but if it does I would like to know how I could program it to do this. I am willing to purchase another device that wiould fulfill my needs so if anyone knows of one pleas let me know. Thanks in advance.

0 Kudos
Message 1 of 2
(4,524 Views)

I don't think you should have any problem doing this with your device.  NI's device drivers do a good job of moving data from their data acq boards to system RAM in the background so that for very many tasks, the memory available for data acq has more to do with your system RAM than board's own internal memory.

 

400 hz sustained data transfer is fairly trivial for DAQmx to handle for you.  You could also stream continuously to file, a practice I'd recommend.  That way, if something happens 8.5 minutes in, you don't lose all the data up to that point.

 

To get started, open up the shipping examples "Counter - Continuous Output.vi" and  "Counter - Count Edges (Continuous Clock).vi". Run the output example using ctr0 of your device.  Note the 'Output Terminal' specified there ("PFI12" by default).  Then run the edge counting example using ctr1 while setting up the 'Sample Clock Source' to match the other vi's 'Output Terminal.'

 

So now ctr1 is buffering edge counts at a sample rate determined by the output frequency of ctr0.  It periodically updates the front panel with a small subset of these counts.  (You can expect a bunch of 0 values if you haven't supplied any edges to count.)

 

Try that much to get started, then see if you can work out how to continuously save data to file in the loop that keeps querying counts.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 2
(4,508 Views)