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: 

event detection of USB stick

I have need of the ability to detect insertion of a USB memory stick and use that to initiate some activities.  Does anyone know of a way to detect the insertion?  Windows apparently detects a memory stick and opens a window giving a choioce of activites.  Can LabVIEW grab that "event"?

0 Kudos
Message 1 of 7
(2,781 Views)

hartzde,

 

Check out this link:

http://digital.ni.com/public.nsf/allkb/A418B761CA7DBE7586257544002D536A

 

 

James K.
National Instruments
Applications Engineer
Message 2 of 7
(2,747 Views)

Extension of this question:

I am looking for ideas of how I can detect insertion of a memory stick on a Citrix thin client.  My program (LabVIEW 2012 SP1) works fine on a PC (detects memory stick insertion, erases contents, and copies new contents).  On the Citrix client the program sits waiting for the insertion, while the client goes ahead and opens the memory stick directory.  So the Windows OS on the client is detecting the insertion, but my program cannot see it.  My program sees the keyboard input, mouse input and barcode reader input, all USB.

My program sits in a loop checking if the E:\ drive exists, while the USB stick opens as the E:\ drive on screen. 

0 Kudos
Message 3 of 7
(2,685 Views)

Hi hartzde, 

 

Unfortunately, I'm not very familiar with the Citrix thin client.  What OS is it running?  Are you running your VI as an executable or in the development environment?  What NI software do you have installed to run it?

0 Kudos
Message 4 of 7
(2,655 Views)

I believe the Thin client is running Windows XP embedded.  My application is an EXE installed on the server with the LVRT for 2012SP1.  Basically, as I understand it, the client is a mirror of the application running on the server.  I cannot figure out how to separate the local USB ports from the server USB ports.

0 Kudos
Message 5 of 7
(2,646 Views)

So the USB device you're trying to detect is a memory stick?  You mentioned your program checking to see if E:\ exists.  Does it work?  As far as detecting USB ports, you mentioned you can't tell the difference between local and server ports, does this mean you can see all of them already?  Have you tried to plug in devices and see what pops up on a particular port?

 

Regards,

 

Bobby Breyer
Applications Engineer
National Instruments
0 Kudos
Message 6 of 7
(2,627 Views)

O yeah, inserting the memory stick causes the usual response from the Windows OS, a window opens showing the contents of the memory stick identified as E:.  The LabVIEW application running and waiting for the insertion does not detect the memory stick.  The application works great on a regular PC.  On the Citrix client, we think it is waiting for the E: drive of the server to show up rather than the client.

0 Kudos
Message 7 of 7
(2,617 Views)