02-08-2010 05:21 PM
Situation:
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).
02-08-2010 05:29 PM
02-08-2010 06:28 PM - edited 02-08-2010 06:31 PM
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!
02-08-2010 08:22 PM
I use Textpad ( http://www.textpad.com/ ) for files shared between Windows and Unix.
Works great.
02-11-2010 12:02 PM
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.
02-11-2010 12:10 PM
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.
Lynn
02-12-2010 02:38 PM
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 ?
02-15-2010 10:11 AM
Hi m-s,
You should be able to using the System Exec VI: http://zone.ni.com/reference/en-XX/help/371361F-01/glang/system_exec/