High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Fetching multirecord acquisitions takes too much time

Solved!
Go to solution

Hello,

 

I need to improve the performance of my code making multi record acquisition on the following system.

Labview 2009, Niscope 3.5.2, 5122 Digitizer card on the PXI 1042 with PXI-8106 Controller connected to the host computer Dell Optiplex 380 PC with 4GB RAM by crossover cable.

I tested the transfer speed of my connection to the chassis using the niScope Stream to Memory Maximum Transfer Rate.vi, The result was 110.74 MB/s.

I need to use the digitizer to get the waveform from different seismic transducers and it should be as fast as possible to be able to switch to different transducers at a reasonable time. I have used the Multi records fetch VI to monitor the rate at which the code runs. I want to acquire 30 waveforms with 10,000 points record length at 100 MS/s sampling rate.

Fetching 30 records with 10,000 record length takes about 300 ms, which is too much time for my experiment. I have tried different record numbers and found the code takes 10 milliseconds per record. I found that the fetch vi takes most of the time. I ran both my code and the Multi record fetch vi. Both runs at the rate which is not satisfactory for my application. I appreciate if anybody can help me to solve the issue.

 

Thanks,

Ahmad

.

Download All
0 Kudos
Message 1 of 11
(8,773 Views)

Your problem is that the driver is transfering each record individually.  The overhead of the transfer is killing your throughput.  Try using the attribute "Enable Records > Memory" (under horizontal).  This will force the records to be allocated in a more compact way in onboard memory.  Also make sure you are fetching more than 1 record at a time (the driver should optimize this transfer and transfer multiple records as part of one transfer).

0 Kudos
Message 2 of 11
(8,766 Views)

Thanks for the advice. I think I have already used the attribute "Enable records>Memory" and multiple fetching in the Multi record fetch VI, which is attached to the previous post. It takes 320 mS using 30 records to acquire  and 30 for number of records to fetch. I am wondering if you can tell me how much time it should ideally take to transfer each waveform for 10,000 samples at 100MS/s sampling rate.

 

Does it also take around 300 Milliseconds for 30 records on your testing system? I think the fetch should theoretically take sth less than 10 Milliseconds for 30 records.

 

I appreciate your time and attention.

Thanks,

Ahmad

0 Kudos
Message 3 of 11
(8,760 Views)

The time you are measuring is the time to configure the hardware, start the acquisition, wait for the acquisition to complete, and fetch the data back to the host.  I've modified your vi to wait for the acquisition to complete before fetching the data (this is only to measure the performance of the fetch.  in your application you don't want to do this.).  I measured the fetch time to be about 15 ms.  As you increase the number of records the time per record drops.  I also measured that fetching more records at a time improves the throughput.

 

Most likely what is happening is that the triggers you are sending to the scope are coming relatively slower.  It is also possible you are missing triggers.  The rearm time of the device is 10us.  You can set "enable TDC" to false to reduce the rearm time to ~2 us (the trade off is you don't get sub sample accuracy on your timestamps.).

 

Hope this helps.

0 Kudos
Message 4 of 11
(8,738 Views)

Thank you for your help. This clarifies lots of things. I have run the code you modified and observed that it takes 296 ms to fetch the data with 9.866 ms for each record, which is really weird. my system takes 296 ms instead of 15 ms. That is why I think sth is wrong in my system. It seems it runs much slower than other systems.

 

Similarly, I have found some similar code in the discussion forum and noticed that my system runs very slowly. According to this post, http://forums.ni.com/t5/PXI/Slow-fetch-PXI-5122/m-p/556112, somebody has reported that the fetch function takes 350 ms, while mine takes 5119 ms. It seems to me that no matter how you write the code, it takes 10 ms for each record. I feel sth is wrong in my system and hope to be able to figure it out.

 

Thanks,

Ahmad

0 Kudos
Message 5 of 11
(8,726 Views)

Makes sense.  You can also try to set the priority for the process in windows task manager to high.  That might help.

 

Good luck.

0 Kudos
Message 6 of 11
(8,713 Views)

I have used another computer to check if the poor performance is due to the PC or not. Both my laptob and PC runs at the same speed and I got 300 ms for the data acquisition. I ran the code attached to see how fast transferring the data is. I got 108Mbytes/s as the transfer rate. Is it possible that the digitizer is not working properly? Is there any way to find the reseaon why it is too slow?  

 

Thanks,

0 Kudos
Message 7 of 11
(8,704 Views)
Solution
Accepted by topic author Ahedayat

I found that on the pulse generator PRF was set to 100 Hz, which means it sends the pulse evey 1/100 s or every 10 ms. I think the program was waiting to acquire the signal. I changed the PRF to 1K Hz, it became much faster.

 

Thanks,

Ahmad

0 Kudos
Message 8 of 11
(8,679 Views)

I've got 35122's being triggered sequentially  by Trigger 2 from a 7854R board and each taking aroung 15000 samples at 100MHz.  Functionally it works great, but the time between drinks is too long... as the Senator said.

I started experimenting withh a little VI with three loops.  the first sets things up, the second acquires, and the third gets all of the data.  But something strange happens if I include a "configure Trigger digital" vi in the setup loop.  This causes the fetch loop to take over 1 second  whereas if diagram disabled out it takes two milliseconds to fetch.  Also, triggering and fetching all three in one loop takes only .5ms / board in my "real" vi.  Attached is a couple of snap shots.  would you give me some direction as to what is going on? and perhaps point to a good example on how  to speed this up?

Download All
0 Kudos
Message 9 of 11
(5,791 Views)

Hello David,

 

It appears that you posted on an older forum.  To have better luck, I recommend posting this on a new forum.  You should have a lot more luck with community response on a newer post.

 

 

 

Thanks,

John R.
National Instruments
0 Kudos
Message 10 of 11
(5,770 Views)