Using TCPIP Connections In LabView

        TCP/IP is a way of sending and receiving data reliably over a network.  TCP/IP functions are built into LabView, and give the instrumentation and control engineer a way of transmitting information across the network reliably.  Here are the some general comments on using TCP/IP.

        TCP/IP is an Internet Protocol (IP).  The TCP part of the name refers to Transmission Control Protocol.  When you send something over the net it is subdivided into packets, and each packet could take a different route from one computer to the other over the net.  Those packets could arrive at different times and be out of order.  Some might not make it at all, and when that happens, TCP will request a re-send to be sure that is has all of the packets.  Then, TCP reassembles the packets.  The nice thing is that you don't have to worry about all of those things.  TCP makes it all happen reliably.

        If you want to use TCP/IP you need to do the following in LabView.


Examples

E1 -  Using TCP/IP Write.  This is the diagram of a sub-vi we have developed that will write a string to a remote computer. Click here for a more detailed look at this vi.

Note the following steps that are needed to send a single string.


E2  -  Using TCP/IP Read.  This is the diagram of a sub-vi we have developed that will receive a string send from a remote computer.  Click here for a more detailed look at this vi.

Note the following steps that are needed to receive a single string.



        There is one final thing that you will need.  When you are done doing whatever you want to do over the network, you need to close the connection.  Use the TCP/IP Close Connection vi, with the icon shown below.
And that is just about all you need to do.