31-07-2012, 03:32 PM
Using LabVIEW with TCP/IP and UDP
LabVIEW.pdf (Size: 27.08 KB / Downloads: 241)
Overview
Internet Protocol (IP), User Datagram Protocol (UDP), and Transmission Control Protocol (TCP) are the basic tools
for network communication. The name TCP/IP comes from two of the best-known protocols of the internet protocol
suite, the Transmission Control Protocol and the Internet Protocol.
With TCP/IP you can communicate over single networks or interconnected networks (Internet). The individual
networks can be separated by large geographical distances. TCP/IP routes data from one network or Internet computer
to another. Because TCP/IP is available on most computers, it can transfer information between diverse systems.
LabVIEW and TCP/IP
You can use the TCP/IP protocols with LabVIEW on all platforms. LabVIEW includes TCP and UDP functions for
creating client or server VIs.
IP
IP performs the low-level service of moving data between computers. IP packages data into components called
datagrams. A datagram contains, among other things, the data and a header that indicates the source and destination
addresses. IP determines the correct path for the datagram to take across the network or internet and sends the data to
the specified destination.
IP cannot guarantee delivery. In fact, IP may deliver a single datagram more than once if the datagram is duplicated in
transmission. Programs rarely use IP because they use TCP or UDP instead.
UDP
UDP provides simple, low-level communication between processes on computers. Processes communicate by
sending datagrams to a destination computer or port. A port is the location where you send data. IP handles the
computer-to-computer delivery. Once the datagram reaches the destination computer, UDP moves the datagram to its
destination port. If the destination port is not open, UDP discards the datagram. UDP shares all the delivery problems
of IP.
Use UDP in applications where reliability is not critical. For example, an application might transmit informative data
to a destination frequently enough that a few lost segments of data are not problematic.
Using UDP
Because UDP is not a connection-based protocol as TCP is, you do not need to establish a connection with a destination
before you send or receive data. Instead, you specify the destination for the data when you send each datagram.
Operating systems do not report transmission errors.