Showing results for 
Search instead for 
Did you mean: 

Formatting ASCII data for other platforms




Measurement platform : Labview 8.6 running on Fedora 10.


The output data is in the shape of an ASCII file containing multiple columns of data with linefeeds as the EOL character.


Some of the users read this data on windows and run into the obvious problem (columns are mucked up). Is there a way to specify CR LF as the EOL in the VI somewhere ?


I have helped the users with the command line unix2dos utility but many of them are command line shy, and in any case, this should be doable in LabVIEW (or so I hope). 

0 Kudos
Message 1 of 8
Are you using the End of Line Constant when you are writing the file? This will generate a LF on Unix, and a CR/LF on Windows. What are you using to write the file? What are your users using to read the file? Is it another LabVIEW program?
0 Kudos
Message 2 of 8

How do your users read the file under windows?


AFAIK, only notepad cannot correctly display text with only linefeed characters and thus will no wrap correctly.


Have them use wordpad (or ms word, etc.) and it should all look OK. Try it!

Message Edited by altenbach on 02-08-2010 04:31 PM

LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 3 of 8

I use Textpad ( ) for files shared between Windows and Unix. 

Works great.

0 Kudos
Message 4 of 8

I am just using the write to spreadsheet VI.


I am not specifying any EOL.


The users analyze the data in Microcal Origin and Kaleidagraph. Both mess it up when they do not get the right EOL. If I manually convert it using unix2dos, it works fine.


So, I need a way to generate the windows EOL in Labview running on Linux. 

0 Kudos
Message 5 of 8

Use the Array to Spreadsheet String VI.  Then search through the string and replace all LF with CR/LF or whatever EOL character you want.  Then write the string to file with the basic Write Text to File function.


This is one situation where the easy-to-use, built-in function is not quite adequate and you have to make your own.



0 Kudos
Message 6 of 8

Maybe the simplest thing to do is to call unix2dos from labview.


Is there a way to call a bash shell command from labview on linux ? 

0 Kudos
Message 7 of 8

Hi m-s,


You should be able to using the System Exec VI: 

0 Kudos
Message 8 of 8