LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

automatic file naming and data saving

Solved!
Go to solution

Hi,

 

I am building a program where there will be several I-V scan for each value of temperature. I would like to make the data saving fully automatic. 

To explain in more deatils:

 

I want the program to generate a new file on its own , give a file name depending on the temperature variable , save the data and again go for the next I-V scan and do the same way.

So, if at a particulat temp say 300K, there are 5 iterations, my program should be such that it generates a new file evrytime say 300K_001(1st iteration), 300K_002,...300K_005(5th iteration) automatically on the hit of "run" button.

 

Can some one help me on how to implement such a code.

 

Thanks!

 

0 Kudos
Message 1 of 6
(3,202 Views)

People do things like that all the time.

 

Look at the Number to String conversion functions in the String palette and the Build Path function in the File palette.

 

You should think about error handling. What happens if you try to create the 300K_001 file and a file with that name already exists? Do you want to over-write the file, change the name to 300K_001_a, or ask the operator for input?

 

Lynn

0 Kudos
Message 2 of 6
(3,190 Views)
Hi Lynn,

I have already used the function build path to create the data file and then dave it.
I don't want to overwrite any file, but create a new file 300K_002 and so on. I want the program to be such that for every single iteration, it should create a new file on its own by giving the name automatically without me entering any file name.
Can you post any such example problem
0 Kudos
Message 3 of 6
(3,187 Views)

What have you tried? This is not really all that difficult.  You will learn a lot more if your try something and then we ehlp you with it than if someone does it for you. Please post your VI.

 

Lynn

0 Kudos
Message 4 of 6
(3,183 Views)

Hi Lynn,

 

Currently I don't have the access to my programs. Will post the vi tomorrow once I go to my lab.

 

Thanks

0 Kudos
Message 5 of 6
(3,173 Views)
Solution
Accepted by topic author ainat

Hi Lynn,

 

I could get it done by using "write to measurement file". It creates a new file with every iteration on its own.

 

Thanks

0 Kudos
Message 6 of 6
(3,144 Views)