Example Code

Find available VI Server Targets

Code and Documents

Attachment

Overview

Use this application to scan across an ip address range to find your VI Server targets. Useful when you don’t have direct access to a machine to find its IP, or if you are looking for unsecured VI servers on your network.


Description

The code cycles through a range of IP addresses and attempts to open a connection to the VI server (if there is one) on that IP address. If the connection is successful there will be no error. If the connection errors out, that typically means its either a Non-LabVIEW machine or a LabVIEW Machine with VI Server disabled/secured. A conditional terminal is utilised in the FOR loop, to only return machines that are available as VI server targets.


Steps to Implement or Execute Code

The code is ready to run, the default behaviour is to scan the IP Range 10.100.1.1 through 10.100.1.254, however this can be easily changed.

  1. 1. Adjust string constant from "10.100.1." to suit the first 3 components of IP address(es) you may be interested in, For Example: "192.168.1."
  2. 2. Adjust the number of iterations to suit the size of the range you are looking at.

Requirements

LabVIEW 2013 Base


example.PNG

Applications Engineer

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

Contributors