01-08-2013 02:57 PM
I have a command-line application. I can use System Exec.vi to execute system commands. Then I call this command-line application which enters % prompt. From that forward, I cannot send any text/command through System Exec.vi. My understanding is this command-line application exits DOS command mode.
The application I am using is axsdb, not a commonly seen one.
Thank you very much for the help!
01-08-2013 03:15 PM
can you show the LabVIEW call to system exec? It can be set up to call an external routine and exit or to wait for the external to complete, which is what it sounds like may be happening.

01-08-2013 03:24 PM
This is my test code. The bat file was generated from test.txt attached.
Folder C:\Axonn\Production_Testers\Source_Code\Data\STX3\ASIC_FW is where axsdb command-line application is saved.
01-08-2013 04:08 PM
You cannot send interactive commands to a program using System Exec. You might be able to find an alternate approach using pipes or .NET components with some searching of this forum; I know the question has been asked before but I don't remember seeing a definite solution.
01-08-2013 04:19 PM
Another option might be to use a (gasp) batch file.
Mike...
01-08-2013 04:20 PM
@mikeporter wrote:
Another option might be to use a (gasp) batch file.
No - the problem appears to be that the user is running a program that provides its own command-line interface, so a batch file won't help (unless that program supports some sort of scripting itself).
01-08-2013 04:56 PM
You are right. Batch file does not help. I saw the Pipe thread. Will read that. And I found an argument of my command. Maybe that could solve the problem. Thanks.
01-08-2013 05:11 PM
System exec starts the application and can wait till it finishes. It does not communicate with it in between. You can pass input parameters (if application supports them), you can get output result (if application returns it in the specified form).
To communicate with an application it should have the interface (based on disk, local resources like udp, etc). Windows interface for humans is also an interface: find application window, click mouse to set focus where you need it, generate keyboard output. If you can not modify application it can work 😃