Example Code

Simple TCP/IP Protocol Example 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

Demonstrates the simple TCP/IP VI’s for both Server and Client.

 

Description

Here is a brief description of the example:

The File Select Popup function has a Default Directory parameter, but to build the correct path you must first use the Get Current User function to retrieve the username of the user currently logged in and then build the path by using Append String.

This example points to the desktop of an XP machine. The path string can be modified to point to a different directory.

 

Requirements:

  1. LabVIEW 2013  (or compatible)
  2. NI RIO Device Driver 13.0  (or compatible)
  3. LabVIEW Real Time Module  (or compatible)

 

Steps to Implement or Execute Code:

  1. Generate a directory path by retrieving the user name of the current logged in user
  2. Concatenate the rest of the path
  3. Set the path as the default directory for the File Select Popup function

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