LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

load different files.txt automatically

Solved!
Go to solution

hello,

 

I have an application that load a file.txt created previously by a user ....when the user lanuch the application the VI ask for the path of the file to be loaded!

This user could create differents files that configure differents points for his test.....

 

What i want to do is to automatically launch the application and be able to load the differents files without asking for the path again!

 

FOr example the user create 4 files (point1.txt, point2.txt, point3.txt & point4.txt) my application could load only one file but i want to make a loop that allow the user to set the sequence of test : point1.txt during 1 minutes then point3.txt during 2 minutes...etc...

 

Thanks for your help

0 Kudos
Message 1 of 11
(3,352 Views)

Hi Akim_10,

where do you have problems? How shall the user define which txt files comes next? You can use the "Strip Path" function to get only the path from the first selected file. Store this path in a shiftregister for later use.

 

Mike

Message 2 of 11
(3,342 Views)

Hi Mike,

 

The txt file is created by another VI, user enter values.

when done for differents points (point1.txt, point2.txt....etc), the user launch the application for his test, this application is a sequence (same sequence copied)!

So the first time the user is asked for a file to load (path), at the end of the first sequence, the application jump to the second sequence asking again for the path of the new file to load!==> user should be in front of the application to load another file!

 

what i need is to nset all files to load in the begining, with the right order and then launch the appli!

 

thanks 

0 Kudos
Message 3 of 11
(3,327 Views)

Hi akim_10,

you can use a dialog, to ask for all files. Store them in an array and use them to run your sequence.

 

Mike

Message 4 of 11
(3,320 Views)

How can i set this dialog? and then load the sequence?

 

thanks

0 Kudos
Message 5 of 11
(3,316 Views)

Hi akim_10,

maybe like this.

 

Mike

Message 6 of 11
(3,309 Views)

Thanks a lot Mike, that's working!

 

The only remaining issue I got is that all the sequences occurs for all files (3 sequences...and 3 files= 9 sequences instead of 3 wanted), one for each file, even by using a while for that contains the sequences!

 

tx

 Akim

0 Kudos
Message 7 of 11
(3,297 Views)

Hi Akim,

how did you implement it into your code? Can you upload your vi or a picture of it?

 

Mike

0 Kudos
Message 8 of 11
(3,292 Views)

Hi mike,

 

find attached a picture of my application!

 

Tx

0 Kudos
Message 9 of 11
(3,271 Views)

Hi Akim_10,

sorry, but i don't see the problem. Maybe you have to change the condition of the while loop.

 

Mike

0 Kudos
Message 10 of 11
(3,268 Views)