LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CompactRIO USB Problem

Greetings,
I'm trying to develop an application on the CompactRIO that saves data to a front-panel USB drive.  However, I've discovered something that's a bit troubling.  When the USB stick is not present, the U:\ drive still is.  Without the USB stick present, the CompactRIO saves the data into its memory.  When I access the internal storage via ftp, I get one filelist if the stick is present (the USB stick's filelist) and another if it isn't (the internal storage of the cRIO in the /u/ directory).

My main problem is that I don't want to save data to the internal storage, I want to be able to light an error light when the USB stick isn't present.  But from the cRIO's perspective, the u:/ drive is always present.

Workarounds or confirmations of this issue are welcome ... Thanks for your time,
Mike Webster

Edit to add:
Sorry, I was wrong on the ftp access.  It is only showing the internal /u/ directory of the cRIO whether the USB stick is present or not.  However, when the USB stick is present, a file saved to u:/path/filename is saved to the USB stick correctly.  When it is not present, it shows up in the cRIO's /u/ directory.


Message Edited by MichaelWebster on 03-25-2008 10:41 AM

Message Edited by MichaelWebster on 03-25-2008 10:41 AM
0 Kudos
Message 1 of 3
(3,565 Views)

Hi Mike,

Message 5 of this thread includes an example which uses Get Volume Info to detect a USB drive.  In LabVIEW 8.5 this VI is on the Functions Palette under Programming » File I/O » Advanced File Functions.  Hope this helps!

Jennifer R.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(3,533 Views)
The solution there does work, IF you make sure that you've deleted the /u/ folder from the cRIO memory and prevent the creation of a file or folder while the USB drive is not present.  Otherwise, the cRIO will recreate the /u/ directory and then the get volume info will return stats on the internal memory with no error.

Weird behavior nonetheless.  If I hadn't caught it, the log files would have completely filled up the internal storage after a few months of usage (the tests are run without the USB stick being present in about half the cases).

Thanks for your help,
Mike
0 Kudos
Message 3 of 3
(3,517 Views)