07-22-2005 06:45 AM
07-22-2005 09:15 AM
My experience is that you can't eject a thumb drive because LV will continue to hold a reference to it open until it quits itself. What I do is when I'm done with the drive is wait a while and then I pull the drive out. Yes, Windows will complain and warn you about possible data loss, but short of shutting down LV I have found no way of getting it to let go of the drive.
Mike...
07-22-2005 09:31 AM
07-22-2005 07:14 PM
07-22-2005 07:40 PM
07-24-2005 02:06 AM
09-28-2005 01:39 AM
There's some weird behaviour with USB flash drive and LabVIEW. As you all have noted above, accessing a file directly from the USB driver using LabVIEW File IO functions appears to "hold" the drive -- we cannot "Safely remove the drive" using the tray icon (until LabVIEW is shutdown; even though all file references are closed).
However, a strange thing I noticed is that if I then access a local file (as on my C: drive), I can then safely remove the USB stick. It appears that reading the local file forced LabVIEW to somehow "release" the USB drive!
Anybody know what could be happening here? Any way of "releasing" the USB drive programmatically?
Thank you in advance!
-Khalid
09-28-2005 03:21 AM
09-28-2005 04:00 AM
I am not an expert on interfacing LV with the windows API, nor have I tried to disconnect a USB device programmatically, so the answer I gave was the only one I have. If I had a better answer, I would have given it.
The reason I gave this answer was because it's not clear where the problem was - you should note the difference between what Khalid describes and what Deepu says in post 4 - it seems that the original problem was finding a way to make to make the windows call, in which case my advice from 2 months ago was perfectly suitable as an answer (as acknowledged by Mike).
As for my previous answer, you may have seen it, but apparently Deepu did not. If people would actually search for an answer before posting, the activity in this board would drop considerably, but since most people don't search, we end up giving the same replies over and over.
And in case it wasn't clear - don't tell me what not to do, especially when it seems you're wrong. As long as a person isn't actively polluting the forum (let's say by asking the same question in multiple threads), there is no need to make remarks. Just ignore the things that bother you.
09-28-2005 06:48 AM