02-13-2010 02:12 AM
Platform:
Labview 8.6 on Fedora 10.
The VI is generating some data that I wish to convert to a form that a Windows user can work with (with CR/LF as the EOL). Is there a way to issue a shell command (specifically: $unix2dos <generated file name>) from within labview ?
Solved! Go to Solution.
02-13-2010 02:36 AM - edited 02-13-2010 02:38 AM
Hi,
have you tried the "System Exec" function? According to context help it should work on UNIX too...
Btw. you have asked a related question in an other thread. Wouldn't converting the string data in the VI itself work? Or making a special VI for that purpose and enable the conversion by a switch (like "Win compatible format?")?
02-13-2010 01:16 PM - edited 02-13-2010 01:25 PM
Thanks for the hint. That will probably work.
That said, unix2dos is simpler than manually converting string data (I like to use write to spreadsheet VI).
02-14-2010 03:32 AM - edited 02-14-2010 03:32 AM
Hi m-s,
"Write to spreadsheet" is the same as "array to spreadsheet string", followed by "write file". So you only need to include a small step: replace EOL chars if neccessary (which means just one string function!)...
02-14-2010 01:22 PM
It may be the same, but it involves more wiring around (though I could in principle make a VI out of this). unix2dos is a simple one step solution for my case that can be put outside the main structure at the end of the code and is independent of the internal structure of the file.
Just simpler.