LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using command prompt to control labview program without opening it

Solved!
Go to solution

Default value mean value when start. After that you can set any value

Message 11 of 18
(1,271 Views)

Thanks again for your help everything iis working fine. Now I want to turn this VI into a .exe. Any idea how could I use it with cmd without it opening (meaning that ti would work in the background like windows updater or an anti-virus)

0 Kudos
Message 12 of 18
(1,244 Views)

You can hide FP by property node

hidd.png

 

Also, if you want to hide the taskbar icon you can edit the INI file of your EXE.

Include the key "HideRootwindow=True"…

I checked it in LV16, don't know about 11.

0 Kudos
Message 13 of 18
(1,238 Views)

Thanks man. I have just one last question. I can initialize the VI with cmd but couldn't figure how to control it while it's running. Here is a really simple Program. as you can see typing cmd "C:\Program Files (x86)\National Instruments\LabVIEW 2011\LabVIEW.exe" "C:\Location of VI\Test.vi" -- /On

will make the LED turn on but after that if I use the same command with Off nothing happens unless I close the vi. Any idea how to make my program read the command prompt while its running. Help would be much much appreciated.

0 Kudos
Message 14 of 18
(1,230 Views)

What are you really want to do?
Looks like you trying use incorrect methods.
cmd works only once, when you start programme.

By cmd script you can edit file. The same file you can periodically check by your program.

Message 15 of 18
(1,214 Views)

The command line arguments property is only going to read in the command line inputs on application initialization.  To have control from the command line while the program is running is going to be more difficult.

 

The first thing to come to mind is to try to use UDP or TCP to send messages to localhost or 127.0.0.1, and to have your program listen on a specific port and respond accordingly.  Generating these messages from command line may require a third party application like Netcat.  Windows XP had a telnet client that you could use to generate TCP messages from command line.  You have to manually enable this feature for Windows 7 through the "Turn Windows features on or off" settings window.

Message 16 of 18
(1,212 Views)

Ok thanks. That was just to add an extra optional thing to the program, its not that important. Thanks again for your help and support

0 Kudos
Message 17 of 18
(1,192 Views)

By the way I've been looking online you can execute exe files with system exc function but how do you type comments in the cmd from Labview?

I need to create a help function that will explain the how my custom arguments work.

0 Kudos
Message 18 of 18
(1,187 Views)