LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to text file. EOL what does it do? Documentation bug

We all know the 'Write to text file function'

 

We all know the EOL glyph on the function, and how to turn it off.

 

But when we want to know what exactly happens, we go to the help.

 

A first skim does not show the EOL option.

So we use search on that page and we find a not about EOL function:

 


 

This function appends platform-dependent end-of-line (EOL) characters to the elements of an array even if you right-click the function and remove the checkmark next to the Convert EOL shortcut menu item.

 


 

So you read this long sentence, and think 'oh yes'.

Then you re-read.

And your brain starts working (our the caffeine is kicking in), and you think, wait a minute, this only tells me when the EOL setting is ignored.

 

The documenation for this basic function DOES NOT MENTION THE SINGLE OPTION YOU HAVE TO CONFIGURE.

Please fix these little things.

This setting is important, because it might alter our data, so we have the right to know what happens.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 1 of 14
(6,008 Views)

It doesn't sound like it's ever off.  To me this line:

 

This function appends platform-dependent end-of-line (EOL) characters to the elements of an array even if you right-click the function and remove the checkmark next to the Convert EOL shortcut menu item.

 

... means that the function will add an EOL and although there's a switch to turn the behavior OFF it will ignore you and do it anyway.  Smiley Mad

 

I think I'll try it and see what it really does.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 2 of 14
(6,001 Views)

I checked my old 7.1. help:

 

convert eol determines whether the function converts the end of line markers it writes into system end of line markers. An end of line marker is a carriage return followed by a linefeed on Windows, a carriage return on Mac OS, and a linefeed on UNIX. The LabVIEW end of line marker is a linefeed.

 

So on Win and LINUX, nothing happens cause LV, Win and LINUX all use LF.

I just guess this replaces all LF by a CR if using a Mac.

 

Felix

0 Kudos
Message 3 of 14
(5,988 Views)

There is an example that explains a lot:

 

C:\Program Files\National Instruments\LabVIEW 2010\examples\general\functions\File IO\Write-Read Text File.vi

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
0 Kudos
Message 4 of 14
(5,984 Views)

 


@f. Schubert wrote:

I checked my old 7.1. help:

 

convert eol determines whether the function converts the end of line markers it writes into system end of line markers. An end of line marker is a carriage return followed by a linefeed on Windows, a carriage return on Mac OS, and a linefeed on UNIX. The LabVIEW end of line marker is a linefeed.

 

So on Win and LINUX, nothing happens cause LV, Win and LINUX all use LF.

I just guess this replaces all LF by a CR if using a Mac.

 

Felix


 

I guess your wrong.

 

Win: CR/LF

Lin:  LF

Mac: CR

 

So whenever LabVIEW encounters a Linefeed in the datastream to store it will place a CR/LF on my Windows machine.

 

I find it quite strange that this functions has one (1) parameter and the help does not describe this option. Smiley Surprised and that I have to dig through the examples.

And this examples doesn't really clarify what happens.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 14
(5,971 Views)

OOps, I was wondering why Win and Linux were the same, cause I new they were different. Thanks for pointing out my mistake.

 

Anyway, at least this a documentation bug.

 

Propably this is even a code bug, but everyone that is using a cretain set of OSes is used to deal with it correctly.

 

Felix

0 Kudos
Message 6 of 14
(5,961 Views)

Unless your are using cross platform, then most people would not notice it.

 

Imagine a data-aquisition system written in Unix/Linux and the data is reviewed on a Mac.  😉

I'm sure the code would not be written using the Write to text file.vi.. 

Well...  the programmer would soon discover that an alternative method would be appreciated. 😄

0 Kudos
Message 7 of 14
(5,953 Views)

Hi All,

 

thank you so much for your discussion; I created a request to make this documentation more complete, this is done by a corrective action request (CAR); 247469.

 

Have a great weekend in advance,

Martijn S
Applications Engineer
NI Netherlands
Message 8 of 14
(5,860 Views)

Interesting that the initial post was from Ton in the Netherlands and NI's response is also from there!

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 9 of 14
(5,844 Views)

Hi Putnam Monroe,

 

This is because Ton is from the Netherlands; he marked this in his NI profile. After a while (when no respond) the forum post is send to the local office from the person who started the forum post. I was a little bit behind in answering the posts, so I'm sorry for the delay.

 

Greetings from the Netherlands,

Martijn S
Applications Engineer
NI Netherlands
Message 10 of 14
(5,827 Views)