LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to check for new drive formed

I am connecting one hardware board to my pc through USB port, which is forming new drive in the pc everytime it is connected to computer.

i want to make a check for that particular drive only , i have tried with list folder vi by wiring empty path to it but it is detecting all the drives.

I dont know how it would be done that program should detect only the drive corresponding to that hardware.

0 Kudos
Message 1 of 12
(4,199 Views)

Ritu

 

If i'm not wrong you have a external harddirve/USB flash drive.

 

That means it has a specific letter for the volume it is creating in the My Computer.

 

You can list all drives using "wmic logicaldisk get name" command using "System Exec.vi" from functions pallete.

 

And continuously search for the volume letter you are connecting.

 

This will let you detect the specific drive you are connecting

 

I hope this idea will work, if not please let me know.

 

0 Kudos
Message 2 of 12
(4,182 Views)

Thankyou ManLD for your rply,

 

although i didn't get your explanation corectly, but i tried as you told, but the output that i am geeting is same as  when i use list folder vi , may be i am not implementing correctly.

 

i am attaching the snippet of what i am doing and the output i am getting

 

i am not getting how to search for the volume letter, please explain a bit more.

 

 

 

Download All
0 Kudos
Message 3 of 12
(4,170 Views)

You should try this:

Get Extended Windows File Information in LabVIEW

 

Find the attached example (saved in LabVIEW version 2012).


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 4 of 12
(4,160 Views)

Ritu,

 

Please check the VI on dropbox link.

 

 

0 Kudos
Message 5 of 12
(4,152 Views)

@ManLD wrote:

Please check the VI on dropbox link.


Simpler code with same functionality.

 

Simpler Code.png


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 6 of 12
(4,123 Views)

thankyou moderator 1983

 

i dont know how your vi is detecting latest drive, as per my observation based on some time stamp it is detecting the latest drive, but how the vi is creating that time stamp, in this vi instead of detecting thew latest drive with rescently inserted device, it is detecting some network drive as the latest drive.

 

ManLD

 

The vi you posted will always search for F:\ in search volume but it could  be different drive in different system 

0 Kudos
Message 7 of 12
(4,122 Views)

I have tried using check if file or folder exist vi, it is detecting only the drive's that are currently accessible ( e.g. in my system only the hard disk drive, netwrok drive and usb flash drive) if it is possible to detect the drive only for device with removable storage( or if we can search only hard disk drive's in the system) than by using serach array, but the thing is how to detect only those particular drive's. 

0 Kudos
Message 8 of 12
(4,112 Views)

Thankyou moderator 1983 and ManLD, i found the solution now  i am detecting the drive with the drive name, which will always remain constant for my device.

 

thanks for the help.

0 Kudos
Message 9 of 12
(4,093 Views)

Great...!!

 

Also I created an utility VI, to determine the type of drive.

 

Edited: 


@Ritu wrote:

i am detecting the drive with the drive name, which will always remain constant for my device.


Drive name or Drive letter...??


I am not allergic to Kudos, in fact I love Kudos.

 Make your LabVIEW experience more CONVENIENT.


0 Kudos
Message 10 of 12
(4,090 Views)