01-19-2014 11:02 PM - edited 01-19-2014 11:04 PM
I have an executable program, for example myprogram.exe, located in "C:\Documents and Settings\myname\myprogram.exe" (I use windows xp 32 bit)
When I run the program (by running cmd and type "myprogram.exe > to_text.txt" on the command line), the program will print out the result to that text file.
But when I try to run the whole thing on LabVIEW, I can't manage to do so. LabVIEW only supports using the "Run Command" of Windows, not the cmd. (using the SystemExec vi)
So how can I run "myprogram.txt > to_text.txt" on LabVIEW as I run it in cmd? Moreover, how can I send the break event (by pressing Ctrl+C in the cmd) by LabVIEW to stop the program?
With my appreciations!
01-20-2014 12:57 AM
Hi!
try giving a look here: http://digital.ni.com/public.nsf/websearch/B93C9ECA6C958202862567FB004C0A9D?OpenDocument
Hope this helps,
Marco
01-20-2014 03:44 AM
Often the solution is to initially call the command line interpreter with a subsequent call to the actual program.
So a call to "cmd /C C:\Path\Prog.exe /switch > redirection.log" could help.
For more information on cmd type in a command line window "cmd /?".
01-20-2014 08:28 AM
I made this a while ago and haven't tested it too much but it should do what you want. Provide the application path, then the switches in the array. It does work with built in commands like dir and copy.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord