From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to run .exe file by labview?

Dear All,
I want to use Labview to run a .exe file, but I don't know how to do? who can tell you? Thanks!
 
Best regards,
Jimmy
0 Kudos
Message 1 of 22
(23,147 Views)
Under all Functions>>Communication>> There is a function that is called system exec.vi.  This vi will allow you to launch an exe using a command line protocol.  Look at the help for this function.  hope this helps.
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 2 of 22
(23,128 Views)

Try the attached VI (LV v7.1.1). It uses the System Exec function:

(from the LV Help file):
"System Exec

Executes a system command. UNIX You can use wildcards, pipes, and shell meta-characters. Mac OS To use this VI on Mac OS, you must have the Macintosh Programmer's Workshop installed. Refer to the Apple Developer Connection Web site for information about downloading the MPW.

To launch an executable with options using the syntax filename.exe -option1 -option2, create a filename.bat file that calls the executable with the options syntax and use this VI to call the filename.bat file. "

Message 3 of 22
(23,129 Views)
Thanks a lot. I can run a .exe file by labview now.
by the way, do you know how to program to close a widcomm bluetooth driver or anyother device driver?
 
Regards,
Jimmy
0 Kudos
Message 4 of 22
(23,122 Views)
Hi, I cannot understand how to pass or get some parameters to a file.exe.
I remember that I was able to pass them directly in the command line, but cannot remeber how.
 
Thanks a lot.
0 Kudos
Message 5 of 22
(23,016 Views)
I forgot the example...
0 Kudos
Message 6 of 22
(23,011 Views)
Try this vi.  It should help you.
 
 
BJD1613

Lead Test Tools Development Engineer

Philips Respironics

Certified LV Architect / Instructor
0 Kudos
Message 7 of 22
(22,996 Views)
Thanks, but I have already downloaded fron the net a similar example. I still have the same problem. I create a Filename.vi  that has an input and an output. I create the Filename.exe but I can't pass it any parameter to the input and get any parameter from the output.
 
What I remember from DOS is a command line like this: >filename.exe par1 par2 parN . But it does not work.
 
Thanks a lot for your help
0 Kudos
Message 8 of 22
(22,988 Views)
What .exe are you trying to run? Not every program accepts command line parameters and not all of the accept them in the same manner. What does the exe documentation say?
0 Kudos
Message 9 of 22
(22,986 Views)
It sounds like he has created a VI called FileName that has a front-panel input and output. He has turned the VI into a standalone executable and cannot figure out why its front panel controls/indicators don't couple to command-line arguments.
0 Kudos
Message 10 of 22
(22,980 Views)