Joost van Hamond Posted December 12, 2005 Report Share Posted December 12, 2005 Hello all, I would like to send a string of data into Java with TCP/IP. Unfortunately I never worked with this communicating language. The examples that LabVIEW has doesn't help me very much. Please, give me some good advice where to start....... Thanks, Joost Quote Link to comment
oskarbosch Posted December 13, 2005 Report Share Posted December 13, 2005 Joost, The first thing to determine is who is listening to an IP port and who will be sending data to it. If Labview is the "server" then use the "TCP listen.vi" Good place to start is in the function palette communication->TCP. When this listen vi returns with someone who is connected, receive or send bytes using the functions "TCP read.vi" and "TCP write.vi". For Java help I suggest to look into a TCP tutorial at the java.sun website. Look into how to use sockets in java (class: Socket, probably in package java.io). Hope this helps... Oskar Quote Link to comment
Labvu Posted December 14, 2005 Report Share Posted December 14, 2005 Joost,The first thing to determine is who is listening to an IP port and who will be sending data to it. If Labview is the "server" then use the "TCP listen.vi" Good place to start is in the function palette communication->TCP. When this listen vi returns with someone who is connected, receive or send bytes using the functions "TCP read.vi" and "TCP write.vi". For Java help I suggest to look into a TCP tutorial at the java.sun website. Look into how to use sockets in java (class: Socket, probably in package java.io). Hope this helps... Oskar Hi oskar, that was of quite a help for me too. I also want to know where does TCP-open comes into picture. what is the difference between TCP-listen and TCP-open as long as application is considered. Quote Link to comment
Rolf Kalbermatter Posted December 15, 2005 Report Share Posted December 15, 2005 Hi oskar, that was of quite a help for me too. I also want to know where does TCP-open comes into picture. what is the difference between TCP-listen and TCP-open as long as application is considered. TCP listen creates a socket and waits for incoming connections. This is in TCP speak the server application. TCP Open connects to a server and therfore is used in a TCP client application. In order to create a server which can simultanously handle several client connections you use the TCP Create Listener and TCP Wait on Listener which above mentioned TCP Listen combines but then only can support one connection. To get some examples search in the LabVIEW example finder for TCP/IP. Rolf Kalbermatter Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.