LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Java method to call LabView on remote computer

Greetings,

 

I am very new to LabView and have a Java programming background.

 

I have to put together a way to submit a String to a LabView vi on a remote computer.  The Labview should then return another String to my Java program.  I just need an example of calling this on the remote computer.  I've seen many looping and circular references to doing it via JNI, but not much that shows a concrete example.

 

Does anyone have a working example of opening the socket (or datagramsocket or whatever), writing to the socket, receiving the response and then closing the socket?

 

Thank you.

0 Kudos
Message 1 of 2
(2,085 Views)

JNI won't really help for remote invocation. With JNI you would normally create a DLL for the local computer that interfaces to whatever you want to call.

 

But considering your mentoining of remote calls, I think it would be easier to implement on the LabVIEW side some TCP/IP server and just call that from your Java program using socket calls.

 

LabVIEW comes with a few networking examples. Check in the example finder for them. Doing the Java part shouldn't really be to difficult either. The fact that both LabVIEW and Java use Network Byte order by default for their flattened data also comes in handy.

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