Example Code

Periodical Multiserver TCP Connections Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

 Overview

A TCP Client that connects periodically to a list of TCP Servers that are waiting for the connection and displays a list of failed connections in case there are any.

 

Description

This Example consists of a TCP Client that connects to a list of TCP Servers that are waiting for the connection, the client connects periodically to each of them and displays a list of failed connections in case there is any. In this example as it was tested in only one PC, multiple ports are used, but if multiple PCs are used it can be configured to work over the same port.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Open Client VI
  2. Set as many elements in the Adress and Port array as connections you want to establish (two as a default)
  3. Select your Wait Time
  4. Run the Client VI
  5. Run the Server VIs
  6. Modify your Wait time and watch the results

 Additional Information or References

 Block Diagram of the VI

BD.JPG

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Francisco Arellano

National Instruments Mexico
Field Systems Engineer - Energy Segment
www.ni.com/soporte

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.