04-24-2008 05:35 PM
04-25-2008 03:58 PM
Hi Vjuno,
Welcome to the forums! I have a couple of questions for you. What DAQ card is the BNC 2110 connected to?
I am unsure of what you mean by scan 10000 points before the acquire data is triggered. Do you mean that you want to have a reference trigger with a number of pre-trigger samples or that you want to monitor 10000 points before actually saving any to disk?
Also, did you mean 10,000*1,000*1,000 = 10,000,000,000 points? Or did you mean 3 channels of 10,000 as in 30,000?
Regards, Mallori M.
04-25-2008 07:40 PM
Hello Mallorim,
Thank you for your reply.
I am not sure, but that should be PCI-6150, (1MHz) . By 10,000 I meant CWAI.NSCANS = 10,000 . So 10,000 points will be scanned before they are plotted on the Graph. And this will be done 1000*1000 = 1000,000 times. And I want to scan all these points before they are finally put into the binary file. How do i Handle such a large number of events. I hope I expressed in a better way now.
Regards
Juno
04-25-2008 07:43 PM
04-25-2008 07:43 PM - edited 04-25-2008 07:44 PM
04-28-2008 05:39 PM
Hello Vjuno,
In order to acquire 10,000,000,000 points you are going to have to be streaming this data to your hard drive as you go. To do this you'll need to write the data you read to a file each loop iteration. In general it is a good practice to make your "samples to read" at least 10% of your sample rate in seconds to avoid overflowing buffers, however, depending on your computer you may be able to go faster. I made an example program in LabVIEW and was able to read 10,000 points at a time from each of 3 analog inputs at 333MHz and write the values to file without overflowing a buffer. However, even opening a web browser while the code was running was enough to delay the VI long enough for the buffer to overflow.
You can use the DAQmx Configure Input Buffer call to increase the buffer size and account for spikes in CPU usage from other processes, and you should also monitor the "Available Samples Per Channel" property to make sure you aren't steadily gaining samples in your buffer. Since you want to acquire 10 billion samples at 1MHz this acquisition will take several hours; if you're not able to keep the buffer empty then it will become apparent before the end of your acquisition. By monitoring the samples in the buffer you can tell if you're pulling the samples out fast enough, if you find that this number is steadily increasing then you should either reduce the sample rate or increase the number of samples to read each time you call the DAQmx Read.
In my example program I used a write to TDMS (binary) file and a PCI-6251.
I hope this helps, and have a good night.
Cheers,
05-06-2008 04:51 PM
05-08-2008 12:12 PM
Hi Vjuno,
The DAQ example programs for VB6 can be found at the locations provided in the Knowledge Base 41P6PDLA: NI-DAQmx Examples for Visual Basic 6.0. I definitely recommend taking a look at these example programs to become familiar with how data acquisition is performed in VB6. The example programs you would most be interested in are the Continuous Acquisition with an Internal Clock (Int Clk).
Regards, Mallori M