04-01-2021 05:22 AM
Hey friends,
I have a rather small problem, however was not able to fix it yet.
There is a zip file attached with a small vi to write some random numbers into a file.
The vi itself works. As you can see in the picture below it safes the data directly into the file.
However if I start this vi in a MyRio Project and run it with the MyRio Device, the output is different. It still safes data into the file but does not start a new line for each set of numbers. Actually I dont know why
Maybe you have a solution for it.
Thanks guys for your help.
Greetings
Samuel
Solved! Go to Solution.
04-01-2021 05:40 AM - edited 04-01-2021 05:41 AM
Hi Suryoyono,
@Suryoyono wrote:
However if I start this vi in a MyRio Project and run it with the MyRio Device, the output is different. It still safes data into the file but does not start a new line for each set of numbers. Actually I dont know why
The myRIO is a different kind of computer than your default Windows pc!
There are two differences between those two text files:
Both text files are valid, as you can easily see once you open them with Excel!
The problem here is that silly text editor from Microsoft/Windows: it cannot handle the plain "NL" end-of-line markers as it searches for Windows-default CR+NL.
Use a better text editor like Notepad++ to read the text file as you expect it!
04-01-2021 05:52 AM
@Suryoyono wrote:
However if I start this vi in a MyRio Project and run it with the MyRio Device, the output is different. It still safes data into the file but does not start a new line for each set of numbers. Actually I dont know why
What you are seeing is a difference in operating systems' End Of Line. In Windows, EOL is a Carriage Return and a Line Feed. Linux (what the myRIO runs) just uses a Line Feed.
04-01-2021 06:37 AM
Thank you guys both for your fast answers and awesome information.
I checked it out and if I open the txt data with excel, it rightly converts the data after setting it up.
@Gerd
I also downloaded Notepad++ and it works fine with it. Youre amazing haha.
I wish you both a great weekend and happy easter