Overview
This code shows how to search a given network for a device using the serial number of the device and the System Configuration VIs.
Description
This code was developed to find the hostname and the IP address of a device on a network using the serial number of the device.
Steps to Implement or Execute Code
- Initialize the system configuration VI to gather information for a given target using the Initialize Session.vi from the System Configuration palette. All System Configuration VIs are located on the Functions Palette»Real-Time»RT Utilites»System Configuration.
- Use the Find.vi from the System Configuration palette to find all devices of a certain class on the network. The class of device can be specified using the "Device Class" string control on the Front Panel.
- With Auto-Indexing enabled, pass the array containing all devices on the network into a While loop. Initialize a session using the Initialize Session.vi to begin gathering information on each device in the array.
- Use a System Session property node to obtain the serial number for the device. This property node is located on the Functions Palette by navigating to Real-Time»RT Utilites»System Configuration»RT Software»System Node.
- Using the Equal? function node, compare the serial number of the device found on the network to the serial number specified on the Front Panel. If the serial numbers are the same, the while loop will stop executing and the hostname and IP address will be displayed on the Front Panel. If the specified serial number is not found on the network, a dialog box will appear that indicates a device with that serial number was not found on the network.
Requirements
Software
LabVIEW 2013 Real-Time Module
NI System Configuration
Additional Images or Video
