03-16-2012 02:10 PM
I am having some strange issues with a 9076 (and a 9012/9112) logging to a USB thumb drive from RT.
Essentially I have a DMA buffer wirtten to in FPGA and read out in a WHILE loop in RT.
This code works PERFECTLY WELL when either logging to the embedded flash or to an SSD drive connected via USB.
However, when connected to a USB thumb drive, the WRITE functions (I have used both the Write Bytes and the Write Binary) both take too long and my DMA buffer over-runs.
The highest data rate we have tried is 189bytes x 2KHz = 378Kb/sec, and we write the byes out in 9,450 or 18,900 byte chunks.
We tested several thumb drives on windows, and they move data much faster than this without trouble. Some work perfectly, some work for a while and then we have errors, some don't work at all.
So just to reiterate:
03-16-2012 03:32 PM
Thumb drives are notorious for not running fast. Most are made as cheap as possible. Have you tested the actual write speed from Windows? You can use this tool or make your own. http://zone.ni.com/devzone/cda/epd/p/id/399
If you did find one model that works, buy a bunch and call it good.
03-31-2014 06:43 AM
Did you ever get any further with this. I'm experiencing a similar problem and I've tested my USB drive and the write speed is better that 3MB/s but I'm not getting any where need this speed when using LabVIEW real-time on the 9076
03-31-2014 08:10 AM
Not getting enough speed at 3MBs per second? If that is in bits then you are looking at writing 93750K double precision numbers a second. How much faster do you need to record data? What did you measure your USB stick speed at?
Wire_Warrior
03-31-2014 08:21 AM
I think you misread what I said, I know the USB drive is capable of 3MB/s and I acheive this using a test program in Windows. Unfortunately when using the same USB drive with 9076 I'm getting a lot less. More like 16KB/second
03-31-2014 08:37 AM
Your right I did misunderstand your post. Sorry about that.
Can you post your code? That would be the best way to help you find out what's happening.
Wire Warrior
03-31-2014 09:32 AM
Okay I have an answer. I have been using the NI-9222 module example and modified this to write to the USB drive. When I wrote 4000 elements from the FIFO to the file I was achieving a very low write rate.
The solution is to write to a queue in the FIFO read loop and in a separate while loop read from queue and write to the file. Using this method I was able to achieve a write rate of approximately 1MB/second. Still not as fast as the drive is capable of but fast enough for my requirements.
03-31-2014 09:59 AM
Sorry I never followed up...
The 9076 does not write as fast as a windows machine; It's VERY dependent on the quality/make of the usb stick, even if you code as well as possible.
We tried about a half dozen "high-quality" usb3.0 sticks- the quality is across the board, even on the same brand/model.
In the end, we foudn that an SSD drive with a good USB3.0 adapter was the fastest solution.
03-31-2014 10:11 AM
Thanks for the feedback.
At present I'm just using some USB drives I had which were available to me now and are 1GB drives. I'm going to buy some other drives which are 16GB or 32GB and are supposed to have 8MB write speeds. That probably will meet my requirements.
If necessary I'll try a SSD drive since it seem a faster solution so thanks for the advice
02-02-2015 03:03 AM
Hi !
I know the thread is a little bit old, but this might be helpfull :
http://forums.ni.com/t5/Data-Acquisition-Idea-Exchange/Hard-Drive-cRIO-Modules/idc-p/3083536#M562