rejgina Posted April 25, 2008 Report Share Posted April 25, 2008 Hi guys, Good day!I have a problem.. I'm a new programmer of Labview. how can i access the USB FLASH DRIVE and the .dat file content by using the Labview.Hope you can help me. Thanks! Kind Regards,rejgina Quote Link to comment
shoneill Posted April 25, 2008 Report Share Posted April 25, 2008 QUOTE (rejgina @ Apr 24 2008, 11:38 AM) Hi guys, Good day!I have a problem.. I'm a new programmer of Labview. how can i access the USB FLASH DRIVE and the .dat file content by using the Labview.Hope you can help me. Thanks! Kind Regards,rejgina If your USB drive is (for example) installed as "E:", then a simple file open with E:\YourFilePath.dat should do it. Do you need to know which Drive letter is assigned? You can get the drives by listing the Directories without specifying a path. You can then try to get the label anme of each one to find the USB drive you require...... (theory) Ah, I just tried doing what I'm proposing, but I don't know how to get the Volume label from the Volume letter...... There's no "Get Volume Label" function. It would be possible via a DOS Batch file or something, but I don't think there's a built-in LV function for it. I looked under LV 8.20. Shane. Quote Link to comment
rejgina Posted April 29, 2008 Author Report Share Posted April 29, 2008 Hi Shane, Thank you for your reply... I think I didn't explain right the question.. First I have a file (Myfile.dat) and it is constantly inserted... (E:\Myfile.dat) What I need to do is to detect if the flash drive is already inserted so that I can read the file(E:\Myfile.dat) and then proceed to the testing.. I have read here taht i need to have awhile loop until the value for example set to true meaning it is inserted... But its oo complicated.. can you help me? Thanks! rejgina Quote Link to comment
Norbac Posted April 29, 2008 Report Share Posted April 29, 2008 QUOTE (rejgina @ Apr 28 2008, 12:18 AM) Hi Shane,Thank you for your reply... I think I didn't explain right the question.. First I have a file (Myfile.dat) and it is constantly inserted... (E:\Myfile.dat) What I need to do is to detect if the flash drive is already inserted so that I can read the file(E:\Myfile.dat) and then proceed to the testing.. I have read here taht i need to have awhile loop until the value for example set to true meaning it is inserted... But its oo complicated.. can you help me? Thanks! rejgina Hi, I think the best way to check this, is to verify if the file exist. You can do it using the open/create/replace file vi. If the file exist (the USB flash memory is inserted) you will have a ZERO on the error out, but if it is not inserted you will have a SEVEN on the error out connector. here my two cents......... Over and out. Norbac Quote Link to comment
rejgina Posted April 30, 2008 Author Report Share Posted April 30, 2008 QUOTE (Norbac @ Apr 29 2008, 04:58 AM) Hi, I think the best way to check this, is to verify if the file exist. You can do it using the open/create/replace file vi. If the file exist (the USB flash memory is inserted) you will have a ZERO on the error out, but if it is not inserted you will have a SEVEN on the error out connector.here my two cents......... Over and out. Norbac Hi Norbac, Yes i alredy do that.. But the error indicator is compose of a package the boolean the numeric and the strings? so how can i extract it to compare the numeric 7 to 0 so i can trigger my next program to proceed if read the memory stick??? thanks alot!!! rejgina Quote Link to comment
Rolf Kalbermatter Posted April 30, 2008 Report Share Posted April 30, 2008 QUOTE (rejgina @ Apr 28 2008, 08:54 PM) Hi Norbac,Yes i alredy do that.. But the error indicator is compose of a package the boolean the numeric and the strings? so how can i extract it to compare the numeric 7 to 0 so i can trigger my next program to proceed if read the memory stick??? thanks alot!!! rejgina Please read the introduction to LabVIEW first and then a bit about clusters, bundling and unbundling. Rolf Kalbermatter Quote Link to comment
Norbac Posted April 30, 2008 Report Share Posted April 30, 2008 QUOTE (rejgina @ Apr 28 2008, 07:54 PM) Hi Norbac,Yes i alredy do that.. But the error indicator is compose of a package the boolean the numeric and the strings? so how can i extract it to compare the numeric 7 to 0 so i can trigger my next program to proceed if read the memory stick??? thanks alot!!! rejgina OK, that "package" is a Cluster, you can access any of the Cluster components using the "Unbundle by Name" function, it is located on the Cluster Palete. With this function you can select, in a induvidual way, any of the components of the Cluster. I hope this information "make a light on your way" Norbac Quote Link to comment
rejgina Posted May 1, 2008 Author Report Share Posted May 1, 2008 QUOTE (Norbac @ Apr 29 2008, 09:42 PM) OK, that "package" is a Cluster, you can access any of the Cluster components using the "Unbundle by Name" function, it is located on the Cluster Palete. With this function you can select, in a induvidual way, any of the components of the Cluster.I hope this information "make a light on your way" Norbac Guys, Thanks alot!!! I really appreciate your help... I guess i need to read alot of things.. Sorry guys, 'coz i just started this w/o any reading i just started this by the lecture of one of my colleagues and by self practice....I'm glad I found this site!!! Thanks! God Bless! Kind regards, rejgina Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.