LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I integrate a Java based API in LV 2011

Hi, I wanted to integrate a Java based API to my application. I am still not knowing what are the inputs of the API. But I need to understand how to integrate APIs in LV application.

 

Many thanks.

0 Kudos
Message 1 of 4
(2,833 Views)

Well there are several techniques to integrate external code in LabVIEW. The Call Library Node is used to access standard shared libraries (DLLs on Windows), the ActiveX interface is used to access ActiveX components, the .Net interface for .. indeed .Net assemblies. However Java is a bit more tricky as that does not usually come as a shared library and definitely not as ActiveX or .Net component.

 

I believe there have been attempts to create a Java embedding interface for LabVIEW in the past that could load and execute JARs, but as far as I know they never have reached a mature status. It sure would be a very laborous effort and given Javas moving target character (Java only guarantees compatibilty in its internal functions, not how it can be embedded) and current status also a bit of a risky decision to spend that much time for it.

 

The most promising way would be to have the Java API execute in its own Java program with some sort of network interface added so that you can connect from LabVIEW to it using network functions.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(2,830 Views)

Hi, Thanks for your kind reply. It was disappointing to know that there need to be a great deal of efforts from our side to integrate the Java API in LV 2011. Now, please tell me, how easy / difficult will it be if its a .dll made out of Java?

Anticipating your kind reply.

0 Kudos
Message 3 of 4
(2,798 Views)

My experience with Java is limited to programming some small Java functionality entirely in Java. So not sure about how to create a DLL from Java code, but if it is created as a normal Windows DLL, then the Call Library node should be able to call it, provided the DLL function interface can be made to conform to standard C programming datatypes and paradigmas.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(2,794 Views)