LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

automatic file generation

What I want to do is write data to a spreadsheet file and have this file named from a user input string earlier in the code ( I am passing all the user inputs through each VI via clusters). For example, one of the user inputs is "Unique Valve ID Number". Therefore when I write my data to a spreadsheet, I automatically want the file name to be the Unique valve ID number without a dialogue box appearing asking me to type this in. I also want the file to be save automatically to a specific location on my network every time.
 
As a result each time I log a test, the filename will be the unique valve ID number and all the files will be located in the same location.
 
Can anyone help. (I am using labview 7.1 if anyone is sending in an example good)
 
Thank you.
 
Jamie
0 Kudos
Message 1 of 8
(3,081 Views)
You just need to create your path as a string and then use the String to Path function. As an example:

Message Edited by smercurio_fc on 07-12-2007 09:06 AM

Message 2 of 8
(3,075 Views)

Thanks,

Seems like this would work if it were just a number I was using, but the unique valve ID number is in the following format "VLV-163480-01".

Jamie

Message 3 of 8
(3,062 Views)
I was just providing that as an example. Clearly you would need to modify the format string to suit your purposes. In your case you can just change the %d to %s and feed in your valve number as a string. You could also use the Concatenate Strings function. Both methods get you to the same place: a string that correponds to a path. Please take a look at the documentation for the Format Into String function.
Message 4 of 8
(3,056 Views)

Thanks alot. Fairly new to this so your help is much appreciated. Works fine.

 

 

Message 5 of 8
(3,049 Views)
No problem.

I have no idea who gave you a one-star rating on your reply, but it was not deserved. We seem to have another case of intolerance on this board. Either that or another troll.
Message 6 of 8
(3,037 Views)
I gave you a 5 star just to help the ratings. I say 5 stars or no stars at all. You now have a rating of 3



Joe.
"NOTHING IS EVER EASY"
Message 7 of 8
(3,032 Views)
thanks guys
Message 8 of 8
(3,024 Views)