LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a shell command from LabVIEW

Solved!
Go to solution

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 ? 

0 Kudos
Message 1 of 5
(4,161 Views)
Solution
Accepted by topic author m-s

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?")?

Message Edited by GerdW on 02-13-2010 09:38 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 5
(4,156 Views)

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). 

Message Edited by m-s on 02-13-2010 01:25 PM
0 Kudos
Message 3 of 5
(4,136 Views)

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!)...

Message Edited by GerdW on 02-14-2010 10:32 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(4,107 Views)

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. 

0 Kudos
Message 5 of 5
(4,092 Views)