LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Command Line support

Hi ,

I am Implementing Command Line support for my tool. 

I've added it as well using the help from this reference.

Now after finishing, the command line control does not return to the prompt.

So I manually need to press enter key. Is there a way where I command prompt comes automatically after finishing the process. Also 2nd line in the below sample is unnecessary. Is there a way I can remove it as well.

 

C:\Work\builds\AutomationTool>Automation -h

C:\Work\builds\AutomationTool>
Automation Tool v1.0 - Executes Scripts in Automated environment
Usage: Automation [-r all | <script name> <repeat count (default = 1)>]
Automation [-h] [-v]
-r Run test
   all - Run all the scripts.
-h show this help message and exit.
-v Shows version information and exit.

 

0 Kudos
Message 1 of 14
(3,358 Views)

Its surprising that there is no solution to my problem.

0 Kudos
Message 2 of 14
(3,286 Views)

Well, this forum is about LabVIEW. Your question is about the command line.

 

 

I'm not saying your question has nothing to do with LabVIEW, just that I can't really tell how it's related.

 

Maybe if you explain your question from a LabVIEW perspective, we will better understand the problem from our point of view?

0 Kudos
Message 3 of 14
(3,276 Views)

Yes the question is about command line support in Labview. It is not about other environment. If LabView supports passing of command line arguments then there should be some standard way of doing it as well.

My tool is developed in LabView and I 'm willing to run it from command line as well.

So the question is about how it can be achieved in LabView?

0 Kudos
Message 4 of 14
(3,242 Views)

@lvbms wrote:

Yes the question is about command line support in Labview. It is not about other environment. If LabView supports passing of command line arguments then there should be some standard way of doing it as well.

My tool is developed in LabView and I 'm willing to run it from command line as well.

So the question is about how it can be achieved in LabView?


Who said LabVIEW supports command line interface? Pretty sure it's a Windows application that does not (pretend to) support CLI.

 

It's possible, but two way communication through the CLI is difficult.

 

The command line will be given back to the user when your application terminates.

0 Kudos
Message 5 of 14
(3,235 Views)

Is it just the -h that requires Enter or all parameters? Do your program exist correctly after performing 1 command? This sounds like a problem with your code, can you post it?

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 14
(3,234 Views)

Here is how we did command prompt interface back in the day. I don't do much with this kind of stuff any more. You pass the string to the command line and hit go.

 

Example.png

Tim
GHSP
0 Kudos
Message 7 of 14
(3,225 Views)

@aeastet wrote:

Here is how we did command prompt interface back in the day. I don't do much with this kind of stuff any more. You pass the string to the command line and hit go.


I though the LabVIEW executable was "Automation", and that it was called from the command line, not the other way around?

0 Kudos
Message 8 of 14
(3,221 Views)

So are trying to call a LabVIEW program from the command line? If you are then that really is not a LabVIEW problem as stated above. That would be DOS. I am sure there is a forum for DOS help somewhere on the internet.

Tim
GHSP
0 Kudos
Message 9 of 14
(3,218 Views)

@aeastet wrote:

So are trying to call a LabVIEW program from the command line? If you are then that really is not a LabVIEW problem as stated above. That would be DOS. I am sure there is a forum for DOS help somewhere on the internet.


I agree with OP that part of the problem is LabVIEW related.

 

LabVIEW simply doesn't do CLI very well (and doesn't pretend to).

 

The solution that's used at the moment let's LabVIEW return something on the CLI. But the CLI won't be released until the executable stops running. That's pretty much how any CLI application works.

 

It seems you want to:

+ Start a LabVIEW application

+ Use CLI to send some commands

+ Get back the replies from LabVIEW while the application continues running

 

That is possible, but I think a different approach is needed. Confirm that that is what you (OP) want, and we can follow that route.

Message 10 of 14
(3,215 Views)