LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to run and pass parameters to exe file from the .txt file

Solved!
Go to solution

hi,

 i am facing problem with passing parameters to the .exe file which is run by labview.firstly i have  .txt script with parameters which i have to pass to .exe file. This .exe file is also a software and that script is written for it.And now i have to create  programm in labview which should fullfill following points.

  1. I have to use one knob named 'Run script'.If i pressed the knob ,it should open the Browser where i can choose .txt script file.

  2. .exe application should open(Path already chossen).

  3. after passing the parameters .exe application should closed.

  4.And labview now should update his parameter

I can just open .exe file using Exce.vi but i dont getting any idea to do more than this.can somebody please help me?

 

0 Kudos
Message 1 of 4
(4,552 Views)

This depends on the exe file. Does it retrieve the information as standard input or does it require the information as command line arguments?

 

Depending on this, you can read the txt-file in LV (using the file functions) and pass the content to the System Exec.vi.

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 4
(4,542 Views)
Solution
Accepted by topic author tadhika

Thanks norbert . can i do like this way?what should i change now??Attached vi below..

0 Kudos
Message 3 of 4
(4,529 Views)

The question is:

Does your VI work?

If not, you must make sure how the EXE expects the script file and how that argument/standard input must be formatted. This is defined by the EXE, so no one except the creator of the EXE can give you the correct answers....

 

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 4
(4,510 Views)