LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unmounting USB flash drive from cRIO

Hi all,

I am using the USB port of a cRIO 9012 to save datafiles (using File I/O) to a USB flash drive.
After having run the program, I want to unmount the USB drive. Can anyone please tell me if there is a better/nicer way than just taking it out? Since this might result into losing my data if the USB drive gets corrupt (just like under Windows).

I have searched the forums, but I was not able to find anything on dismounting a USB drive on a cRIO...
Hopefully you can help me solving this (little) problem.

Thanks in advance,
Joep

0 Kudos
Message 1 of 4
(2,858 Views)
Joep,

under Windows there are two scenarios that could cause data corruption on a USB-Flash-Drive:
  1. The Flash-Drive is removed during a write operation. This potentially destroys the FAT which results in data loss. There is not much that you can do against this behavior, neither on Windows, nor under VxWorks.

  2. With caching enabled for the Flash-Drive there is a chance that files are not written to the drive completely because some parts of it are still sitting in the PC's memory. When the drive gets removed the data is corrupt.
    I don't think that VxWorks uses cache for mass storage devices at all so this issue shouldn't be relevant for a cRIO-9012, but I will double check if this is true.
Best regards,

Jochen Klier
National Instruments Germany
Message 2 of 4
(2,829 Views)
Dear Jochen,

thanks for the reply.
I was hoping there wouldn't be a problem, since I've been taking the flash drive out several times since posting my question...

Awaiting your final answer,

Joep

0 Kudos
Message 3 of 4
(2,827 Views)
Joep,

I have received an answer from a coworker in Austin (thanks Chris!) that verifys my assumption. You shouldn't run into any problems as long as you make sure that you don't unplug the USB drive during a write operation.

Have a great day!

Jochen
0 Kudos
Message 4 of 4
(2,804 Views)