Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Using LabVIEW with TCP, UDP, and Other Low-Level Communications Applications

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

LabVIEW supports several low-level protocols you can use to communicate between computers.

Each protocol is different, especially in the way it refers to the network location of a remote application. Each protocol generally is incompatible with other protocols. For example, if you want to communicate between Mac OS X and Windows, you must use a protocol that works on both platforms, such as TCP.

TCP and UDP

Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) are available on all platforms LabVIEW supports. TCP is a reliable, connection-based protocol. It provides error detection and ensures that data arrive in order and without duplication. For these reasons, TCP is usually the best choice for network applications.

Although UDP can give higher performance than TCP and does not require a connection, it does not guarantee delivery. Typically, use UDP in applications in which guaranteed delivery is not critical. For example, an application might transmit data to a destination frequently enough that a few lost segments of data are not problematic.

Use the UDP Multicast Open VI instead of the UDP Open function to open connections capable of reading, writing, or reading and writing UDP data to or from a multicast IP address. A multicast IP address defines a multicast group. Multicast IP addresses are in the 224.0.0.0 to 239.255.255.255 range. When a client wants to join a multicast group, it subscribes to the multicast IP address of the group. After the client subscribes to a multicast group, the client receives data sent to the multicast IP address.

Apple Events (Mac OS X)

The more common Mac-only form of communication is Apple events. Use Apple events to send messages to request actions or return information from other Mac OS X applications.

Pipe VIs (Linux)

Use the Pipes VIs to open, close, read, and write to Linux named pipes. Use named pipes to communicate between LabVIEW and unrelated processes.

Executing System-Level Commands (Windows and Linux)

Use the System Exec VI to execute or launch other Windows-based applications or Linux command-line applications from within VIs. With the System Exec VI, you execute a system-level command line that can include any parameters supported by the application you want to launch.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit