LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiled LabView exe-file and desktop automation (automated externally from script)

Hi

 

We (work place) have a custom test rig which is controlled by a compiled LV program (executable).

 

I would like to automate the compiled programs operation from our own LabView program - i.e. "remote" control - our program should be able to press buttons, insert values in controls, read indicators etc.

 

I.e.

"Our own GUI".vi  <--- "our own communication back/forth" ---->  "Compiled LV executable from 3rd party"

 

LabView does not appear to use any kind of Windows framework (.NET) and desktop automation software cannot find the buttons based on name - only by button coordinates I measure and use in a script (which move upon FP resize).

 

Any ideas as how to accomplish non-intrusive (or intrusive) remote operation?


Note: We do not have access to the original LV project since the code is the manufacturers own IP and obtaining it is not possible, unfortunately.

 

Note: Thank you for reading the text. The magic words are "thank you for getting this far" 🙂

 

The idea is:

ATEKim_0-1699527881110.png

 

-Kim

0 Kudos
Message 1 of 2
(327 Views)

There are most likely indeed options but they might be tricky to use without some access to the source code.

 

LabVIEW executables can have a VI Server enabled. If VI Server is enabled and started up is configured in the Application ini file for that application.

 

There are two levels of VI Server interface.

 

VI Server has a TCP server interface that understands a LabVIEW specific binary protocol. This protocol is not documented but another LabVIEW program can connect to a VI server port and access it.

 

server.tcp.port=3363
server.tcp.enabled=TRUE
server.tcp.access="+127.0.0.1;+localhost;+*"

 

These are the settings in the ini file to control the VI Server TCP/IP interface.

 

Then there is an Automation Server interface that provides a small subset of what you can do with VI Server.

 

server.ole.enabled=True

 

This interface is a lot more limited but it is also accessible from other programs than LabVIEW that can access the Windows Automation Server interface, aka DCOM, aka ActiveX.

 

Some starting points to see how it could work:

 

https://forums.ni.com/t5/LabVIEW/ActiveX-COM-control-to-LabVIEW-application/td-p/3546227

https://forums.ni.com/t5/Example-Code/LabVIEW-Executable-Used-as-ActiveX-Server-in-LabVIEW/ta-p/3527...

 

Difficulty to make this work is however that you need to know the VI names inside the application on which you want to control the elements and also the names of the controls/indicators that you want to write or read. If you use the LabVIEW native VI Server functions, you can do some discovery of VIs available and also get a list of control names on a VI, so there might be a possibility to actually make this work.

 

Without access to the source code of the application, this is however at least cumbersome to determine.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 2
(298 Views)