From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Interacting with a LabVIEW Generated exe from another program or script

I've starting working on an old system with a LabVIEW generated exe and it turns out the supplier has lost their source code.  The program I have starts off with a toggle switch in Standby (See Attached).  I need it to be in Run after the programs starts and when it is unmanned/reboots/crashes.  Is there a way to control the toggle from another program or script?  If so, what would be a good method to try? 

 

The program was generated with LabVIEW 2012 32bit and runs on a Windows 7 64bit.

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

Have your tried VI Server?

 

George Zou
0 Kudos
Message 2 of 4
(1,815 Views)

If the LabVIEW source for the executable is lost, you have three choices:

  1. Work with the program as it is (not a good choice for you).
  2. Hire a good LabVIEW developer and re-create the program (keep the source!).
  3. Look into "Windows Automation" programs that can recognize programs running in Windows and "push their buttons".  A colleague used something called "AutoIT" to do exactly this in a situation that sounds similar to your plight.  There are probably other (similar) routines -- search the Web.

Bob Schor

 

0 Kudos
Message 3 of 4
(1,800 Views)

Goerge's suggestion to use VI server is also a possibilty albeit with some gotchas. You can enable the TCP/IP VI server interface by adding some settings to the ini file, but the TCP/IP protocol for VI server is not documented and therefore can only really be accessed from another LabVIEW created application or DLL.

There is also an ActiveX interface to VI Server which I'm not sure you can simply enable by just adding the ini file settings. Normally you have to select in the Application Builder settings that option specifically and enter an Active X service name under which the application will register itself on startup.

The automation software option as mentioned by Bob with software like AutoIt is another option that will certainly work albeit can be troublesome too, since LabVIEW front panels are not standard Windows forms so the buttons on the front panel are not sub windows but rather are fully custom handled by LabVIEW so you can not activate a specific button by its Windows window ID but only by cuasing the AutoIt software to generate a mouseclick on the correct screen location.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(1,781 Views)