07-22-2013 11:19 PM
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.
07-23-2013 12:47 AM - edited 07-23-2013 12:49 AM
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.
07-23-2013 01:00 AM
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.
07-23-2013 01:13 AM
You should try this:
Find the attached example (saved in LabVIEW version 2012).
07-23-2013 01:21 AM - edited 07-23-2013 01:24 AM
07-23-2013 01:59 AM
07-23-2013 02:00 AM
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
07-23-2013 02:13 AM
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.
07-23-2013 03:05 AM
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.
07-23-2013 03:10 AM - edited 07-23-2013 03:25 AM
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...??