Example Code

TCP Remote Control of another VI in 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

Description

1. Overview

This example remotely controls and polls data from a target VI on other PC (or localhost).

 

2. Description

Set of VI's INIT, RD_WR, CLOSE to remotely control and poll data from client VI on other PC (or localhost).
Client VI does not need any modifications to be controlled. Server and client can be different LabVIEW version.
Internet Protocol (IP), User Datagram Protocol (UDP), and Transmission Control Protocol (TCP) are th...
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).
Use the TCP/IP functions located on the Functions»Communication»TCP palette for TCP communication in LabVIEW. As
with DAQ, instrument, and File I/O communication, the process involves opening the connection, reading and writing
the information, and closing the connection.

 

3. Requirements

  • NI LabVIEW Professional Development System 2012 (or compatible).

 

4. Steps to Implement or Execute Code

  1. Download and open the compressed project: "TCP Remote Control LabVIEW 2012 NIVerified.lvproj"
  2. Open "Example Main.vi"
  3. Write the Target.vi file path in the VI Path control.
  4. Leave Machine name blank for localhost, or write the remote machine's IP address.
  5. Open Target.vi (do not run it)
  6. Run this VI: "Example Main.vi"
  7. Click Start/Stop button.
  8. Click STOP to abort both VIs.

 

5. Additional Information or References

TCP Remote Control Screenshot.PNG

 

 

 

**The code for this example has been edited to meet the new Community Example Style Guidelines.**

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