LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Recording data from LabVIEW in a text file

Solved!
Go to solution

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. 

0 Kudos
Message 1 of 6
(3,402 Views)
Solution
Accepted by topic author AGovi

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.

Mondoni
0 Kudos
Message 2 of 6
(3,396 Views)

In the code where you build your header, you need to concatinate an End of Line constant.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 6
(3,393 Views)

That was pretty simple! I never knew we could do this. Thanks much for your time and help! 🙂

0 Kudos
Message 4 of 6
(3,385 Views)

Thanks joaopam and crossrulz!

0 Kudos
Message 5 of 6
(3,383 Views)

You're welcome! 

Please mark that as a solution, so if someone has the same problem, the answer will be more easy to find.

Mondoni
0 Kudos
Message 6 of 6
(3,381 Views)