04-10-2017
04:14 PM
- last edited on
06-23-2025
06:26 PM
by
Content Cleaner
Hi,
The following article from the high speed digitizer help shows how to acquire data continuously from an NI high speed digitizer card and store data to the host PC's DRAM.
https://www.ni.com/docs/en-US/bundle/ni-scope/page/acquiring-data-continuously.html
I would like to acquire data continuously from the PCI-5122 card at 100MSPS for more than an hour and store to a SATA or PCIe SSD. Could you suggest a way to perform DMA transfers from the PCI-5122 to the SSD at 200MB/s? Could I do this with labview or with a C code?
Thanks,
Nagaraj.
04-10-2017
08:12 PM
- last edited on
06-23-2025
06:26 PM
by
Content Cleaner
I found this stream to disk example. I am not sure if this example applies only to a PXI controller based system or even to PCI-5122 connected to a PC motherboard.
https://forums.ni.com/t5/Example-Code/NI-SCOPE-Stream-to-Disk-Using-Win32-File-IO/ta-p/3996053
Thanks.
04-11-2017 02:40 PM - edited 04-11-2017 02:42 PM
The example in your second post should work fine with the PCI-5122.
Have you tried running one of the examples?
04-11-2017 04:53 PM
I tried it today. The stream data to disk example works fine up to 50MSPS. I would ideally like to sample at 100MSPS. But when I increase the sampling rate beyond 50MSPS the onboard memory on the PCI-5122 does not seem to get emptied into the system queue.
04-11-2017 05:05 PM
I just noticed the actual sampling rate changes to 100MSPS as soon as I increase the sampling rate to anything above 50MSPS. That's probably because I am using the internal oscillator as the clock source and set it's frequency to 100MHz. And the clock source frequency probably needs to be a whole multiple of the sampling frequency. But still, I wonder why the fetch from onboard memory to the queue stalls at 100MSPS. Not even a single sample seems to get fetched onto the system queue till all the 256M sampled are acquired and fill up the onboard memory. The onboard memory on my PCI-5122 is 256M samples deep.
04-12-2017 01:42 PM
Do you get the same error if you adjust the Samples Per Fetch?
04-12-2017 01:45 PM
Yes. I tried reducing it upto 8x and also increasing it upto 4x. No change in behavior. Reducing the samples per fetch too much breaks even the 50MSPS acquisition.
04-13-2017
02:20 PM
- last edited on
06-23-2025
06:27 PM
by
Content Cleaner
Hi Nagaraj_Anan,
I think what's happening is that the PCI-5122 is being limited by the PCI Bus on your computer. From the 5122 datasheet:
... an NI 5122 can continuously stream data to the host computer at rates up to 110 MB/s using PCI
Since this is a 14-bit Oscilloscope, each sample takes up 2 bytes of data (padded by zeros). Therefore, when recording at 50 MS/s and trying to stream to disk, you are transferring 100 MB/s through the PCI bus, which is near the top of its capabilities.
You might be able to get up to 55 MS/s, but any more than that and you will be exceeding the data transfer rate of the PCI bus on your computer, which in turn would cause your on-board memory to get overwritten before the computer can fetch data points off of it.
Unfortunately, although most of our scopes are specified to read at faster data rates (100 MS/s in your case), when trying to stream data other bottlenecks, like the PCI bus throughput in this case, limit the rates at which you can acquire.
04-13-2017 02:29 PM
Hi Jorr-el, Thanks for the reply. I guess that explains it. I guess more than the PC configuration it has probably got to do with the card not supporting the PCIe standard. It is plugged into a PCIe slot. I wish there was a PCIe equivalent of this card with similar analog specs.
Is there a way to speed up the PCI communication? PCI standard suggests 266MB/s with a 32 bit PCI bus clocked at 66MHz. and 133MB/s with a 32 bit PCI bus clocked at 33MHz. I am wondering if there is a way to overclock the PCI-5122 to achieve the 200MB/s needed.
Thanks,
Nagaraj.
04-13-2017 02:34 PM
I guess the card being a two channel card will take up 200MB/s for two channels operating at 50MSPS. But theoretically if we were acquiring on only one channel we should be able to sample at 100MSPS and be able to live stream data to the SSD. Would that be a possibility?