<img height="1" width="1" src="https://www.facebook.com/tr?id=1101141206686180&amp;ev=PageView &amp;noscript=1">


Enterprise Networking in LabVIEW 1

LabVIEW is a language oriented around the communication of data from one point to another, whether the origin is a data acquisition system, user input or the destination is a log file or a waveform graph.  Sometimes you may find that although the destination and source are simple, the in-between may require different communication technologies.  When the data acquisition system is geographically disparate from the client that reads the data to generate reports, often the easiest way to transfer information is by using a computer network or the Internet. This blog will cover basics of communicating using the TCP protocol.

TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are two industry standard communication protocols that are used and supported in every modern programming language. TCP is generally a one-to-one communication protocol that has built-in error checking. TCP and UDP are routable protocols that can traverse the internet.

Addressing or endpoint identification is handled using a specific protocol (e.g. TCP),  IP Address and Port Number.  An IP address will identify a specific network connection and a port will identify a specific endpoint/application that receives any information.  An IP Address can be private (non-routable) or public (routable) address while a port can be well-known, registered or dynamic/private/ephemeral.

  • Well-known: Ports from 0 - 1023, also known as system ports, often require admin/super user privileges to use.
  • Registered: Port is registered with the IANA (Internet Assigned Numbers Authority) for a specific application
  • Dynamic/Private/Ephemeral: ports that cannot be registered with the IANA (49152 - 65535)


Currently LabVIEW only support IPv4


The broadcast IP address for a network can be used for 1:N communication but is generally disabled or frowned upon in production. Other methods such as UDP multicast are more apt for that use case.

LabVIEW’s low level functions for TCP/UDP use the string data type for reading and writing data.  Other data types can be converted into a consistent string using the unflatten/flatten functions for JSON, XML , String and Variant.

Below are two VIs included in LabVIEW as examples that demonstrate very basic TCP/IP communication between two endpoints located on the same machine. The example is located under <labview>\examples\Data Communication\Protocols\TCP\Simple TCP\Simple TCP.lvproj


The server will listen  and wait for a connection on the local IP address ( and a given port (6340). Once a connection is established, it will send 50 data points to the client every 100ms.


The client will attempt to connect to a server on the local ip address a given port (6340), once the connection has been made, it will convert the string into an array of double numerics.

Take note that the two examples above are incredibly simple and lack the robustness that should be present in a fully featured applications handling things such as: automatic reconnection, more complex data types and heartbeats.In the next installation of this blog series, we will tackle enterprise networking with an emphasis on N:N and 1:N communication using UDP multicast.

Recent Posts:

Filtering Basics: Importance of Linear Phase
Publish Date 26 Apr 2017 Jason ThaiJason Thai

Linear phase and computation/memory complexity are important characteristics to [..]

Revisiting OAuth 2 in LabVIEW
Publish Date 26 Apr 2017 John AmstadtJohn Amstadt

Recap In my previous blog, we took a look at how to implement OAuth2 in LabVIEW. [..]

Engineering a Better 3D Print (Part 1)
Publish Date 26 Apr 2017 Michael MaloneyMichael Maloney

3D Printing and its widespread use has been a long time coming and seems to have [..]

NVCC – Intro to Utilizing GPU Power to Offload the CPU Part 3
Publish Date 26 Apr 2017 Jack BakerJack Baker

Assumptions: Machine has a Nvidia CUDA Core GPU (such as a GeForce) with installed [..]

How I Learn New Skills for Personal Growth
Publish Date 26 Apr 2017 Bryce UrestiBryce Uresti

Learning new skills can be quite the task especially when there's already so much [..]

Controlling the Supply Chain Dream
Publish Date 26 Apr 2017 Thomas MathewThomas Mathew

You are out with your friends, bird watching, and nothing could be more peaceful. [..]

Aligning Data in WAVE
Publish Date 26 Apr 2017 Rohama KhadijaRohama Khadija

When analyzing data from multiple sources, we often find that the time series data [..]