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: 

Access "controls" or buttons on a LabVIEW VI with DLL

Hello Experts,

 

I have a LabVIEW GUI executable file and need to access "control" or buttons on it via another programming lanuguage (Visual Basic .NET) say if the user presses a "EXIT" button on the VB.NET GUI, it goes and clicks the "EXIT" button on the LabVIEW GUI. Is this possible to do using LabVIEW built DLL's ? If not, could you please guide me to the right apprach ?

 

Thank you very much for your time !

0 Kudos
Message 1 of 14
(2,795 Views)
If the creator of the dll connected the controls to the connector pane, they would typically be parameters of the dll. Are they listed in the .h file?
Message 2 of 14
(2,758 Views)

Hello Dennis_Knutson, Thanks for the reply !

 

The main code of the .h file has the following line:

void __cdecl BurnProgramMain(void); //BurnProgramMain is the LabVIEW VI

 

Should the parameters be listed instead of "void" inside the bracket ?

0 Kudos
Message 3 of 14
(2,749 Views)
Yes, they should. Do you have the source code so you can rebuild it?
0 Kudos
Message 4 of 14
(2,728 Views)

No, our vendor provides us only with the executable file since they do not want to share their source code. They created a DLL for us only upon our request.

0 Kudos
Message 5 of 14
(2,725 Views)
Is the front panel of the VI even visible when you call the dll? Your request for the dll seems to have been faulty if you can't pass parameters to it. Or, their build was wrong. Why wouldn't you own the source code if you are paying for its development? I never presumed ownership when doing contract work. Seems odd to me.
0 Kudos
Message 6 of 14
(2,713 Views)

Yes, the front panel comes up after my calling but I am not able to access any "controls" or buttons on it. However, if now (after calling) I manually click on this front panel, it works but I want my VB.NET code to be able to do that.

 

Our vendor owns the source code and they only provide the executable file to be able to communicate to their mechanical system. We, as a OEM, integrate their mechanical system into our system and provide our end customers with the VB code that controls the entire system.

0 Kudos
Message 7 of 14
(2,703 Views)
I don't know what your options may be, sorry. Did they enable the VI Server interface (ActiveX essentially) so you could use properties and methods of the VI?

Complain to the vendor that their software should be better behaved and work from third-party applications without user intervention. Post their name here.
0 Kudos
Message 8 of 14
(2,697 Views)

Hello Dennis_Knutson, I am not sure if they enabled the ActiveX. I read that approach too and figured I will need their VI file - isn't this true ? Does the ActiveX approach work on the exe file ?

0 Kudos
Message 9 of 14
(2,694 Views)
They are the ones that have to include the functionality when the build is done. It works with an exe. I'm not sure about a dll
0 Kudos
Message 10 of 14
(2,691 Views)