03-21-2013 06:10 AM
i'm trying make a vi to open and write in a txt file
my level of LabView is very basic and, i'm looking for help for open (or create) a txt file in a specfication folder, write a value and save this file in a another folder
03-21-2013 07:34 AM
Hello Imemendes
Refer to the Write-Read Text File VI in the labview\examples\general\functions\File IO directory for an example of using the Write to Text File function
03-21-2013 07:36 AM
Sounds like you should go through some of the online tutorials. Or you could use the LabVIEW Example Finder (Help->Find Examples) and do a search for Write File.
03-22-2013 07:15 AM - edited 03-22-2013 07:15 AM
i'm grateful by your response
i achieved a solution to my problem but it seem is not enough
now i need to make three graphics but i'm stuck in a string
i read a file with three line, which every line gives me a different values, i want make three different graphics with that, but i need to separate the string, since lab view show me only one line
in the file is like this
0.0
24.1
40.2
in the lab view is like this
0.0 24.1 40.2
i would like if possible your help to separate this string
i upload mine vi to see how i was
03-22-2013 07:43 AM - edited 03-22-2013 08:03 AM
Can you upload it in LV 2011 version?
From what i have understood, try something like this to seperate and use your stirng
Thanks
03-22-2013 09:14 AM
03-22-2013 09:17 AM
sorry i could'nt save in lbv 11
this is my code
my second objective is read the information in file values.txt, then make them appear in three graphics
in first attempt i try to take da string and convert to number by a array (not in the image) then transforming in a cluster e after in graphic but all have de same have the same value, seems it was made like in the image, but made by a more complicate way.
i use de vi that Nghtcrwlr send and i have two problems, first the values appear like integer and i couldn't make the graphics
i try to use the "edit scan string" but i obtained the error " Scan failed. The input string does not contain data in the expected format
using the %f%f%f the same error ocurred
03-22-2013 09:41 AM
Now that your format constant is using "\" display, get rid of the extra slashes. It should read "%f\n%f\n%f"
03-22-2013 09:54 AM - edited 03-22-2013 10:08 AM
03-22-2013 10:24 AM
apok there are two differents files
the first "setpoint.txt" that the only problem is the decimal values but i think the problem are the the difference between "." and ","
the second file is "values.txt" this file is in constant actualization and this the base to may graphics
crossrulz i try use this three and always have the same error
%f\n%f\n%f
%f\n%f\n%f
%f/n%f/n%f