LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Develop a command-line application using LabVIEW

Solved!
Go to solution

Hi,

         Is it possible to generate a command line(CLI) executable using LabVIEW? This CLI exe will be called with certain command line arguments by another application (written in Visual Basic). The LabVIEW Run time engine can be installed separately on the host PC.

 

 

Thanks for your help

Siddharth 

 

0 Kudos
Message 1 of 10
(8,927 Views)

Hi Siddharth,

it's not really a command line application, but you can read the parameters in your application and you can write text to the command window. Can you explain a bit more about what you are trying to do?

 

Mike

0 Kudos
Message 2 of 10
(8,924 Views)

Hi Mike,

             The LabVIEW application will be invoked with certain arguments by an external application and I don't want the Front panel of the LabVIEW application to be visible. Is it possible to implement this??

Also how can I pass arguments to my LabVIEW application?

 

Best Regards,

Siddharth

 

 

0 Kudos
Message 3 of 10
(8,876 Views)
so you want to call your labview Application from another program?
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 4 of 10
(8,869 Views)

this thread may help:

 

http://forums.ni.com/ni/board/message?board.id=features&message.id=42&query.id=670552#M42

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 5 of 10
(8,864 Views)
You could write your arguments to a .ini file, then read the .ini file with your LabVIEW app.  This won't be a command line call, but it shouldn't be a problem for VB to call another executable.
Message Edited by vt92 on 09-15-2009 07:56 AM
>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
Message 6 of 10
(8,862 Views)
If you simply want to pass in command line arguements to your application then the answer is yes you can. There is a application property which returns the command line arguements given to the application when it was invoked. It will be up to you to define the command line arguements and parse them.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 7 of 10
(8,840 Views)
Solution
Accepted by topic author Siddharth D

The only way which I have found is creating command-line "wrapper", where LabVIEW-based DLL is called. So, you can not only pass parameters to command line application, but also return values from CLI app.

 

Check this thread: Command line tool that returns a value

 

Andrey.

 

0 Kudos
Message 8 of 10
(8,828 Views)
There is an example that ships with LabVIEW that shows how to read the command line arguements from an application. THe name of the VI is CommandLine.vi. It is extremely basic though. The power of command line arguements really comes from how you define and parse them. I recommend allowing your command line arguements to be order independent and that they require a label. For comand lines I prefer to use a single letter for the label. Full words are nice but then your command line gets very long. For the applications that we write we allow both the '/' (DOS/Windows style) and the '-' (Unix/Linux style) to designate a command line label.


Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 9 of 10
(8,813 Views)

I agree with Andrey. Making a dll instead of an exe makes it easy to pass/return data and it solves the hiding front panel issue.

0 Kudos
Message 10 of 10
(8,808 Views)