High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

How to acquire the longest possible time with NI 5112?

Hi I look for to acquire and save in the disc the longest possible my setup is following:

- card NI 5112  32MB memory, but I'm not sure. If you know how i can check let me know thanks 
- LABVIEW 7.1
- Windows XP
-NI SCOPE 3.3

I want to make an continuous acquisition at 100MS/s.

I find examples like niScope EX Fetch forever.VI ,
niScope EX Stream to disk: with this one I'm limited at 10ms
niScope EX Multi Record Fetch More Than Available Memory: I can acquire till 100ms
I try to use the functions Daq and DAQmx for use and configure circular buffer, but I can not use them . my problem is following;
Error -200170 occurred at DAQmx Create Channel (AI-Voltage-Basic).vi


thank you for help me .




 
   
 

0 Kudos
Message 1 of 6
(7,048 Views)
This particular problem is dependent on a large number of variables.  Some things which will effect you:
  1. How fast is the disk you are writing to?  Mainstream disks from five years ago could sustain about 15MBytes/sec.  Mainstream disks now can sustain twice that or more.  High end disks are even faster.  To reliably sustain 100MS/s (200MBytes/sec for both channels) would require a RAID array.
  2. The 5112 only utilizes half the available bandwidth on the PCI bus, so you are theoretically limited to a maximum of 66MBytes/sec bandwidth and 50MBytes/sec is more realistic.
  3. Is your disk controller on the PCI bus or on a separate port to the chipset.  Older computers put the disk controller on the same PCI bus as the plug-in cards.  This means your scope card and the disk are fighting for the 133MB/sec of bandwidth the PCI bus has available, slowing you down.
  4. If you display anything while reading data (plot to a graph, update any front panel control), it will slow you down and reduce the amount of time you can stream to disk.
  5. Separating your read action and your write-to-disk action into separate loops will help things quite a bit (see niScope EX Save to File - HWS Low Level - Single Channel Stream.vi for an example).
  6. Fastest write to disk performance will be achieved using the LabVIEW file primitives.  HWS is a bit slower, but not much.  For fastest performance, take the preceding example and replace the HWS calls with LabVIEW primitives.
  7. Use the smallest data type you can.  In this case, that would be I8, since that is the native resolution of the card.
  8. Turn off all virus scanners, e-mail, screen savers, etc so LabVIEW has as much of the processor as possible.
  9. Defragment your disk.  This can have a huge performance impact. Note that the built-in Microsoft defrag utility is not that good for this application - it does not coalesce empty space very well.
  10. What is your disk format?  NTFS is slower than FAT32.  If you are using NTFS, make sure compression is turned off.  If you are using FAT32, you will be limited to 4GByte file size.
Take home message: If you can achieve about 50MByte/sec transfer speed out of the scope and onto disk, and you have 32MBytes of onboard RAM, you can get about 600ms before running out of memory (deficit is 50MBytes/sec into your 32MByte onboard buffer).  This will require the right computer chipset and hard drive/RAID.

You can query the scope for the amount of on-board memory using the Horizontal->Memory Size property.  Note that not all of this is available for waveforms.  Some is used for bookkeeping operations.

0 Kudos
Message 2 of 6
(7,038 Views)
It occurred to me as I pressed the reply button that the full amount of data you have is probably easily kept in RAM.  There is no real need to stream to disk.  So try the following to get almost theoretical performance:
  1. Preallocate a 2D array of I8s.  The row length is your fetch length (about 300kS is optimum - check this, my memory may be faulty).  The column length is the expected number of fetches before you run out of memory on the scope card (try something in the 300 - 500 range).  This will prevent LabVIEW from having to dynamically allocate memory and slow you down.
  2. Fetch I8s and use the replace array subset primitive to fill your preallocated array.
  3. When you run out of memory, exit the loop and reshape the array to a linear array based on how many points you actually acquired.
Do not display anything to the front panel while acquiring.  You can plot when done (with that number of points, you may want to check out Managing Large Data Sets in LabVIEW).

Good luck.  Let us know if you need more help.
0 Kudos
Message 3 of 6
(7,035 Views)
Hi, thank you for your response

My computer Following are the specifications:

 - AMD Athlon 64 processor 3700+
- 1G RAM


I don't understand why I can't acquire at 100MS/s according to your answer the limit is caused by bandwidth on the PCI bus and the computer hardware.

Do you think Its not possible to do continuous acquisition at 100MS/s the longest possible.

Theoretically with sample rate at 100MS/s and 32MB onboard memory I can get around 300ms before running out of memory.

Actually the maximum i can get
is 100ms .

MIck 


0 Kudos
Message 4 of 6
(7,021 Views)
Hi,

I used the example    niScope EX Save to File - HWS Low Level - Single Channel Stream.vi
is limited by ;

Min sample rate:100M
record length: 2000000
samples to take 10M

Of this fact after calculates the acquisition time is 100ms.

Do you know if is possible execute several time this vi for acquire longest than 100ms.
I think to miss some points between each measure.

thank you

have you good weekend


0 Kudos
Message 5 of 6
(7,016 Views)
You are correct.  The 5112 is bandwidth limited at the PCI bus and cannot stream data as fast as it can take it.  The maximum number of points you can take before running out of memory will depend on how fast you can stream out of the card and how much memory the scope has.  Check how much memory the scope actually has by using the Horizontal->Memory Size property.  You may be able to do this in MAX, as well, but I do not have a 5112 in my computer, so cannot verify this.  These devices are currently sold with 16MBytes and 32MBytes of RAM.  If I remember correctly, earlier versions were sold with much less RAM.

If you have 32MBytes of RAM, you can acquire for 300ms at 100MS/s by setting up a 30 million point finite acquisition, then fetching the data from the scope (make sure you read the large data tutorial before doing this, or you could run out of memory in LabVIEW).  Streaming at 50MS/s while acquiring at 100MS/s should allow you to theoretically get about 600ms of data.  It will be difficult to make this work reliably.  Fortunately, your chipset and memory architecture are recent and fairly efficient, so you have a good chance.  Use the memory method I mentioned above to make this work.

To stream 100MS/s to disk continuously, you will need a set of hardware based on the new PCIe bus.  This would be very expensive.  Perhaps it would be better if we looked at your application to see if there is an easier way to solve it.  Could you give more details on what you are trying to measure?
0 Kudos
Message 6 of 6
(7,006 Views)