This particular problem is dependent on a large number of variables. Some things which will effect you:
- 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.
- 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.
- 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.
- 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.
- 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).
- 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.
- Use the smallest data type you can. In this case, that would be I8, since that is the native resolution of the card.
- Turn off all virus scanners, e-mail, screen savers, etc so LabVIEW has as much of the processor as possible.
- 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.
- 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.