LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I enter non-system Command?

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! 

0 Kudos
Message 1 of 8
(3,544 Views)

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.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 8
(3,531 Views)

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. 

Download All
0 Kudos
Message 3 of 8
(3,523 Views)

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.

0 Kudos
Message 4 of 8
(3,505 Views)

Another option might be to use a (gasp) batch file.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 8
(3,500 Views)

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

0 Kudos
Message 6 of 8
(3,496 Views)

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. 

0 Kudos
Message 7 of 8
(3,485 Views)

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 😃

 

0 Kudos
Message 8 of 8
(3,481 Views)