04-08-2013 12:28 PM
I have a LV program to record data from LabVIEW into a text file. The LV file is attached. My problem is: The first data that is recorded after the data headers, is on the first line of the text file rather than the second. Ideally it should be Headers in Line 1, Data from Line 2 onwards. I do not know what is causing the Data to concatenate with the Headers. Can anyone help on this please.
Thanks and appreciate your time in advance.
Solved! Go to Solution.
04-08-2013 12:36 PM - edited 04-08-2013 12:36 PM
Hello!
Your problem seems to be quite simple, if I understood it right.
All you need is a End of Line Constant to be concatenated with your header.
The End of Line Constant is equals to CRLF.
So, if you concatenate the Header with the CRLF, your concatenated string will be like: "Header \n"
and then, in the following lines (1, 2, 3...) your data will be available as it already were.
I'm attaching a snapshot with this modification.
Hope this solve your problem!
Best regards.
04-08-2013 12:37 PM
In the code where you build your header, you need to concatinate an End of Line constant.
04-08-2013 12:41 PM
That was pretty simple! I never knew we could do this. Thanks much for your time and help! 🙂
04-08-2013 12:42 PM
Thanks joaopam and crossrulz!
04-08-2013 12:43 PM - edited 04-08-2013 12:44 PM
You're welcome!
Please mark that as a solution, so if someone has the same problem, the answer will be more easy to find.