04-20-2017 07:57 AM
Hello everybody,
I have created a txt file with the function "write in file" how can i introduce a line between the different values that i am saving ?
Example i have this : 0,43240,455660,876666
and i want to have : 0,4324
0,455660
0,876666
Thank you for your help !
Bonjour à tous,
J'ai créé un fichier texte avec la fonction "écrire dans un fichier texte" et j'enregistre des valeurs de positions mais je voudrai aller à la ligne entre toutes mes valeurs comment puis je faire ?
Exemple : j'ai ceci : 0,43240,455660,876666
et je souhaite :
0,4324
0,455660
0,876666
Merci pour votre aide !
Solved! Go to Solution.
04-20-2017 08:02 AM - edited 04-20-2017 08:15 AM
04-20-2017 08:06 AM
Hello,
You have to put the constant end of line( in Programation>>String) between the différents values.
SMIRES,
04-20-2017 08:13 AM
Great it finally works !!
thank you everyone 🙂
04-20-2017 09:06 AM
Now i have an other problem.
I want my computer reads the different lines and interprets it as each line is a value for a position of the platform how can i do this ?
thank you
04-20-2017 09:10 AM
Hi Marie,
I want my computer reads the different lines and interprets it as each line is a value for a position of the platform how can i do this ?
Then you should read the text file line by line and interpret each line/value!
There is a function able to read textfiles line by line. And there are functions to convert tet to numbers. Well, there even is a function that reads a whole spreadsheet file (aka delimited text file) and converts it to numbers in one step!
What have you tried so far? Where are you stuck?
Where is your VI?
04-20-2017 09:12 AM
You could use the Read From Delimited File to get the array of values.
Or you can use Read From Text File, right-click on it and choose Read Lines, set the number of lines to read to -1 (read all) and now it will output an array of strings (each element is a line from the file).
04-20-2017 09:50 AM