From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 9802: Write to SD-Card too slow

Hello,

 

I'm trying to read data from 128 channels of 4 NI 9205 modules at 6000Hz and write them to SD-card on 2 NI 9802 moduleson a cRIO 9074. This should be a total of 1,5 MB/s or 0,75 MB/s when writing to both NI9802. The SD-cards are Kingston elite pro 50x which should reach 2 MB/s. But they only write at around 0,2 MB/s.

 

I'm using the FPGA Write Method. I made a test VI, with only a loop writing to a card and stopping the time for writing. It seems that most of the data is written really fast, but then it just slows down and the time for writing is much higher than normal. But only for a loop or so, then its fast again. This happens roughly every second.

 

I know, that the 2 MB/s is only guaranteed for NI SD-cards, but shouldn't other cards perform better than this? What could cause this problem?

 

Regards

0 Kudos
Message 1 of 2
(2,730 Views)

Hello WF,

 

I'm not sure why you are seeing the performance you are. Let me share a couple of my ideas at the moment:

Whereas most SD-Cards should be able to attain the speed of 2MB/s, we haven't tested them in any way, and so cannot say whether they will actually work that fast or not. It is kind of hard to know if the SD-Card is the problem unless we could try our certified one in its place.

I would refer you to the following thread, where the subject is also discussed, and which you already may have read. The second post there describes this problem in a little more detail.

 

As to your test VI, which slows down every second or so, I believe that it slows down when it actually writes the data to the card. You see, an SD-Card is not optimized for random access, but writes whole blocks at a time. My idea here is that it is buffering the data until it reaches the size of a block so that it only needs to write it once. (If you write one byte at a time, it will have to write the whole block you are writing to every time.) This causes it however to slow down, because that is when it is actually writing the data.

 

I would have told you to send me the file so that I could test it myself, but I don't have the required hardware to make the test. I'll look into it further, but I would suggest that you try with different cards, to see how much of it may be related to the card.

 

Regards, 

Message 2 of 2
(2,704 Views)