High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous aquisition with NI-5112

Hello, Please help me...
I am trying to aquire data for about 3~5 seconds at 30MHz sampling rate with NI-5112(32MB on board memory). It was impossible to save the data to hard disk due to a low transfer rate from my computer ram (256MB) to hard disk. I heard the best method is to hold the data in system memory and then save it to disk afterwards, instead of immediately streaming the data to hard disk. Sould I make my own LabVIEW program? or What should I do to accomplish it?

Thank you. Have a nice holiday!"
Message 1 of 10
(7,954 Views)
NI-Scope came with continuous double buffered support.

Software-wise that is the simplest answer.

I am a little concerned about your hardware. Here's what I am thinking (check me).

The board is eight bit BUT LV DAQ usually deals with data as SGL which is 16 bits, two bytes. So,

( 5 seconds ) X ( 30 M Samples/second) X ( 2 bytes/Sample) = 300 MB.

Your machine odes not have enough memory the cache the data. There is a benchmark article on this site somewhere (?) that looks at some high end numbers. You would have to have a disk that could stream data as fast as you were collecting it.

If your hardware can handle it, I suggest going to 1Gig of memory.

Be prepared also, that when the data will be collected and saved that your PC will be very busy. Newer
PC are touting higher PCI bandwidths but it was not that long ago the PCI bus was limited to 30MHz (check this, I may be showing my age).

If you can get the data off the board, across the PCI bus, and into PHYSICAL memory, at 30 Mhz, you should be OK until you run out of memory. Dumping from memory to disk is going to be quite time intensive as well. I would not be suprised if the is a factor of 10 differnce in the memory to disk speed.

Using instead a pragmatic number of 3 we are talking 20 seconds from trigger to file closed.

I hope this helps,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 10
(7,954 Views)
Lil,

I agree with Ben that the continuous double buffering is the easiest way to make your application work. However, the sampling rate you are requesting (30 MS/s) is most likely too high for the system you describe. The data transfer for our NI 5112 uses NI-Scope and thus uses an 8 bit sample, so Ben's math just needs to be divided by a factor of 2. Therefore, the total amount of data you plan on taking will be (5 seconds) X (30 MS/s) X (1 byte/sample) = 150MB. Thus, your system should be able to hold these samples in RAM as long as you don't have a lot of applications open and that much RAM is actually available for use.

As far as programming is concerned, you will want to acquire all of your data first (fetch in a loop or other method) and then
write all of the data to disk at end of the acquisition. You can probably find most of the code you need in the examples that ship with NI-Scope. Let us know if you need some more help along the way.
0 Kudos
Message 3 of 10
(7,954 Views)
Thanks for the check Josh!

We are still asking alot here.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 10
(7,954 Views)
Dear Ben and Josh

Thank you for your help.
Yes, I want to acquire all of data first and then write them to hard disk at end of the acquisition as you mentioned. Now I'm trying to modify LabVIEW examples that ship with NI-Scope. But it is not easy for me. Should I use array function?
Please let me know. I need more help to make a complete code using the above method.
Thank you.
Happy new year!!
0 Kudos
Message 5 of 10
(7,954 Views)
There are many different ways to perform the type of acquisition you desire using NI-Scope and LabVIEW. We can more easily assist you through our support lines by writing an email or calling our Application Engineers. In order to further help you with your question, we need to know if you are doing a continuous acquistion, a multiple record acquisition, or just multiple single record acquisitions. We also need to know what type of data you plan to save (double, binary8, etc.) and how many channels you plan to save. With this information we could better point you to an example that would suit your needs.
Thanks and happy new year!
Josh
0 Kudos
Message 6 of 10
(7,954 Views)
This comment is rated 4 stars! ****


Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 10
(7,954 Views)
Thank you, Josh H
My application is as below;
sampling rate: 30 MHz,
desired acquisition time: 5 second,
number of channel: 1
saving type: binary (After acquistion is completed)

Is there any method to save data automatically after 5 seconds (before RAM is filled) ? I mean RAM store data for 5 seconds and then save data to binary file automatically.

Thanks.
0 Kudos
Message 8 of 10
(7,954 Views)
LIM,

For your application, I would recommend starting with the "Multi Record Fetch Forever.vi" example that ships with NI-Scope. This example performs a multi-record acquisition and transfers each record individually to RAM. In order to transfer all of the data in RAM to disk at the end of the acquisition, wire the data from the fetch function to the edge of the loop and enable indexing so that you keep all of the acquired data in RAM throughout the acquisition. Then, once outside the loop, you should save the acquired data to disk using the File I/O VI's. Good luck!
0 Kudos
Message 9 of 10
(7,954 Views)
Dear Josh H

Thank you so much for your help and kind.
A few days ago, I solved the problem with the exactly same method you mentioned above.
Now, unfortunately, there is another problem.
As you know, my system memory is 256MB (128MB RDRAM *2). An available memory among them is about 110 MB.
I think data acquisition time should be about 10 seconds if I used 10MHz of sampling rate. And about 3 seconds at 30Mhz. Is it correct?
But my system seems not to work correctly. For example,
When I tried to acquire data at 10 MHz for 5 seconds, an error message occured (memory is full). So I checked the memory usage at the task manager window.
Memory before acquisition was 146MB and memory after acquisition was 466MB. T
otal 320MB was increased.
I chose virtual memory as 512MB.
Do you know what the problem is? Will it be ok if I purchase 1 GB ram?
Thank you.
0 Kudos
Message 10 of 10
(7,954 Views)