Free Shipping logo FREE SHIPPING £75+
50 years of Telonic Instruments Ltd logo CELEBRATING 50+ YEARS
Price Match logo PRICE MATCH GUARANTEE

Verification of a working remote communications connection using NI – MAX

Posted on: December 14th, 2020 by Doug Lovell

Automating a test can dramatically increase the productivity, throughput, and accuracy of a process. Automating a setup involves connecting a computer to the test instrumentation using a standard communications bus like USB or LAN and then utilizing code entered via a software layer (like LabVIEW, .NET, Python, etc..) to sequence the specific instrument commands and process data.

This process normally goes quite smoothly, but if there are problems, there are some basic troubleshooting steps that can help get your test up-and-running quickly.

In this note, we are going to show how to use NI-MAX to test the communications connection between an instrument and a remote computer using both a USB and a LAN connection to ensure that they are working properly. Once the connection is verified, you can begin to work on the control software.

National Instruments Measurement and Automation Explorer (NI-MAX) is a free communications tool provided with NI’s VISA library.

You can learn more here: https://digital.ni.com/public.nsf/allkb/71544521BDE34FFB86256FCF005F4FB6

USB Connections

1. Power on and connect the instrument via USB cable to the computer. On a computer running Windows, the first time you connect the USB from an instrument should open a dialog box or show a notification of a new device being connected.

You can check the status of the USB connections by opening Device Manager located in the Control Panel menu of most Windows Operating systems and expanding the driver information as shown below in this Windows 10 example:

This indicates that the operating system recognizes the connected instrument as a test instrument.

If the device manager reports the USB connection as some other type of device (printer, camera, unknown, etc.), there is likely a problem linking the proper driver (ausbtmc.sys) to the instrument. One possible solution to this is to disable the driver, disconnect the USB cable, verify that ausbtmc.sys exists, and then reconnect the USB cable.

2. Run NI-MAX by left-clicking on the icon on the desktop or finding it via the start menu

3. This will open the main window, as shown below:

4. Expand the “Devices and Interfaces” menu. You should see the instruments attached via USB with a brief description as shown for an SDS2000X oscilloscope below:

This indicates that a software application (NI-MAX) has correctly identified a test and measurement device (the oscilloscope) over the USB connection.

5. By left-clicking on the instrument, you can see additional information about it:

6. To further test the connection, right-click on the instrument and select Open VISA Test Panel or select it from the side bar:

The VISA Test Panel window shows some helpful information, including the instrument manufacturer, model, serial number, and the USB identifier (VISA Address) along the top.

7. Another useful item in the VISA Test Panel is the Input/Output function. This mode allows you to send specific instrument commands and receive instrument responses.

This is especially helpful when you are planning a specific test sequence, the effect of delays/timing, or troubleshooting a command. You can send each
command one-at-a-time and check the performance of the instrument.

Select Input/Output > Basic I/O > and Enter the command in the text window:

– *IDN? is a common identification string query (question or information request) that returns the information from the connected instrument
– /n is a termination character that represents a new line. This is the standard termination character for SIGLENT instrumentation.
– Write will send the command to the instrument
– Read will pull data from the instrument
– Query will perform a read and then a write command to request and return data from the instrument

USB Checklist

– Is the USB port configured properly on the instrument? Some instruments feature USB ports that can be configured as TMC (Test and Measurement) or Printer communication ports. The USB port should be set to USBTMC or similar for remote control.
– Try a direct connection to the controlling computer. USB hubs or long connections may cause issues.
– Try a different USB cable. Connectors can go bad or prove to be faulty.
– Try a different USB port on the computer.
– On machines running Windows, check the Device Manager. Test instrumentation should appear as USB Test and Measurement Device (IVI) and use the AUSBTMC.SYS driver

Lan Connections

1. Power on and connect the instrument via LAN cable to a LAN network connected to the computer you wish to use.

You can check the status of the LAN connection by using a software tool like NMAP: https://nmap.org/

NMAP allows you to scan networks and identify IP addresses.

First, identify the LAN connection for the instrument. This is typically located in the System menu under IO or LAN settings.

Here is the IO information for an SDS2000X oscilloscope:

DHCP Enabled will automatically configure the instrument connection settings and apply a valid IP address. With DHCP enabled, the IP address may change over time. It is recommended to check the instrument IP address and then confirm that it is visible on the network using NMAP:

Here, we are performing a Ping (short scan to identify what IP addresses are being used) over the range of IP addresses that may match the instrument.

This can be performed by setting the target using the “/24” extension. This scans 24 bits For example, 192.168.10.0/24 would scan the 256 hosts between
192.168.10.0 and 192.168.10.255

Here is more information from NMAP:
https://nmap.org/book/man-target-specification.html

For example, to ping all IP addresses that start with 192.168.0., set the target as follows:

Note the IP address and MAC address that identify your instrument.

2. Run NI-MAX by left-clicking on the icon on the desktop or finding it via the start menu

This will open the main window, as shown below:

3. Unlike USB, there is not an easy way to identify all of the instruments connected via LAN.

In many cases, you will have to manually add the LAN instrumentation. Recall from Step 2, our instrument IP address is 192.168.0.87

Right-click on Network Devices, and select Create New VISA TCP/IP Resource:

4. Select Manual Entry of LAN:

5. Enter the IP address and press Validate

6. After successfully creating a TCP/IP connection, select finish

7. After the system updates it’s configuration, the instrument will appear in the Network Devices menu:

8. To further test the connection, right-click on the instrument and select Open VISA Test Panel or select it from the side bar:

The VISA Test Panel window shows some helpful information, including the TCP/IP identifier (VISA Address) along the top.

9. Another useful item in the VISA Test Panel is the Input/Output function. This mode allows you to send specific instrument commands and receive instrument responses.

This is especially helpful when you are planning a specific test sequence, the effect of delays/timing, or troubleshooting a command. You can send each command one-at-a-time and check the performance of the instrument.

Select Input/Output > Basic I/O > and Enter the command in the text window:

– *IDN? is a common identification string query (question or information request) that returns the information from the connected instrument
– /n is a termination character that represents a new line. This is the standard termination character for SIGLENT instrumentation.
– Write will send the command to the instrument
– Read will pull data from the instrument
– Query will perform a read and then a write command to request and return data from the instrument

For more information, check SiglentAmerica.com, or contact your local Siglent office.