LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read multiple Files

Solved!
Go to solution

I have a VI which can read LMV files and perform calculations based on the LMV files. I put them in a for loop or a while loop and I am able to read them continuously.

When I run the program, I have to choose an LMV file every time the calculation is done. What I mean is , once I run the program, I am asked to choose a file. LabVIEW performs some calculations on it and then once it is done, I asks me to choose the next file again and this continues.

However what I want to do is to select multiple files at once and let LabVIEW do the calculations for all of them without me having to choose the file again and again. Please do help me with this. Thanks in advance. I have also attached the VI.

Download All
0 Kudos
Message 1 of 7
(4,288 Views)

You can use Filename terminal.

One case, make array of path and select manual. Or form array programmatically

0 Kudos
Message 2 of 7
(4,277 Views)
Solution
Accepted by topic author Akaash_Dragon

The built-in "File Dialog" VI can be used to select multiple files. In the "Configure File Dialog" window, uncheck the box marked "Limit selection to single item". Then you can select multiple files in the same folder easily. The selected files' paths will be in an array, which you can auto-index in your For loop.

Message 3 of 7
(4,269 Views)

I did try that, however the problem is I still have to keep choosing the files again and again. LabVIEW doesn't automatically choose the files which I had selected in the dialogue box.

0 Kudos
Message 4 of 7
(4,230 Views)

Is it the "Write to Measurement File.vi" that's asking you to choose a file each time? You'll have to connect something to its "Filename" input as well if you want to avoid that. Can you automate the generation of the filename to write in each loop iteration, based on the filename that was read?

 

Never mind, I see the problem. In the properties for your "Read from Measurement File" you need to uncheck the "Ask user to choose file" box.

0 Kudos
Message 5 of 7
(4,224 Views)

You didn't wire up the path in the Write To Measurement File.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 7
(4,223 Views)

Thanks a ton! It worked

0 Kudos
Message 7 of 7
(4,218 Views)