Configuring an ATEasy Instrument Driver with an LXI Interface

Knowledge Base Article # Q200338

Read Prior Article Read Next Article
Summary LXI provides a convenient interface for communicating with and controlling benchtop ATE instrumentation. Creating a generic ATEasy driver to support TCP/IP based communication is simple.
  
Login to rate article

Overview

LXI provides a convenient interface for communicating with and controlling benchtop ATE instrumentation.  This article demonstrates how to use an LXI interface to access an instrument's internal web services, use the Telnet application for instrument communication, and how to create a simple, yet useful driver for controlling LXI instruments within ATEasy®.

Basic LXI Guidelines

To communicate with an instrument using LXI, you will need to know two essential interface parameters: the IP address and the remote port.

In this article, the Agilent (Keysight) model 53220A Universal Frequency Counter will serve as a representative instrument.  The 53220A provides multiple remote interfaces, and the front panel can be used to obtain the interface parameters used for remote communication.  The instrument is configured with an IEEE 488 (GPIB) interface, a USB interface, and an LXI (LAN) interface.  From the front panel (Figure 1), the configuration parameters can be viewed to assist the operator in setting up remote operations.  The GPIB primary address is "3", the VISA resource descriptor for the USB port is "USB::2391::6151::MY50005754::0::INSTR", and the LAN/LXI IP address is "169.254.4.32".

53220A Remote Communications Parameters

Figure 1:  Agilent 53220A GPIB, USB and LAN or TCP/IP Remote Communications Parameters

For LXI/LAN instruments, a web server is typically hosted on the instrument as a component of the instrument's operating system, and it can be opened and viewed from any browser (Figure 2).  This web panel provides additional information beyond that displayed on the instrument's front panel, and can be used to configure the instrument's various remote parameters.  In addition to the LAN information shown on the front panel in Figure 1 above, the web panel shows the VISA TCP/IP resource descriptor and both the TCP/IP socket port and the Telnet port.

Agilent 53220A Web Panel

Figure 2:  Agilent 53220A Web Panel.  LXI IP Address and TCP/IP Port Parameters are Highlighted

A quick and easy method to test for LXI communication is using the Telnet application that is provided with Windows®. Telnet provides bidirectional communication between a computer operating as a terminal, and a remote peripheral - in this case the Agilent 53220A.  Communication is achieved by sending text commands to, and receiving text responses from, the peripheral device.  To use Telnet on a Windows platform, the Telnet application needs to be installed.  Type "Windows Features" in the Windows search box and select the Turn Windows features on or off option.  Enable Telnet by checking the check box for Telnet Client as shown in Figure 3 below.

Enabling the Windows Telnet Application

Figure 3:  Enabling the Windows Telnet Client Application

Telnet has a few simple commands that can be viewed by typing "?/H" at the command prompt.  To use Telnet as a terminal for the 53220A, open a socket for the device using the "O" command, provide the IP Address or mDNS Hostname, and include the Telnet Remote Port parameter shown in the 53220A web panel.  The example as shown in Figure 4 is "O A-53220A-05754 5024".  This command opens a port to the Telnet application.  Simply type a valid command to set up the instrument or query a parameter.  Shown in Figure 4 is the "*IDN?" identification query command.

Telnet Terminal Application

Figure 4:  Remote Communication Using the Telnet Terminal Application


Note:  If your instrument does not provide the Telnet remote port information, a common default port used with Telnet is 5024.

ATEasy LXI Control

Once basic LAN communication has been established, controlling an LXI instrument from ATEasy is very simple.  As is typical with most test solutions, there are several methods that can be used within ATEasy to communicate with external instruments.  Knowledge Base Article # Q200194 discusses how to import an LXI function panel (a DLL based driver) into ATEasy.  This produces a robust, high level interface targeted for the specific instrument that the driver was written for.  But it falls short as a general purpose interface, such as when you need to communicate with a different device.  Since LXI uses text communication, a generic text based IO approach covers virtually all LXI instruments.  The following section describes an overview of how to create a generic LXI driver for instrument control using ATEasy IO Tables.  

Note:  Familiarity with creating and using ATEasy IO Tables is assumed.

Begin by creating a new ATEasy Project.  Add a new Driver to the project (Figure 5).  From the Driver Properties, select the General tab and give the new driver the default name of "LXI" (Figure 6).  Select the Interface tab and scroll down the Interface list and select Winsock (Figure 7).

Add a new driver to the LXI project

Figure 5:  Adding a New Driver to the ATEasy LXI Project


Default Driver Name and Interface

Figure 6:  Defining the Default Driver Name                                            Figure 7:  Defining the Driver Interface


Open the driver shortcut, select the Interface tab, and set the Interface to Winsock.  Selecting the WinSock interface populates the tab with additional parameters.  For the Remote Port parameter, enter the TCP/IP Socket Port value from the instrument web panel (5025).  Enter the IP Address value from the web panel in the driver shortcut Address field (169.254.4.32).  The driver is now configured to communicate with IP address 169.254.4.32 on remote port 5025.

ATEasy Driver Shortcut for the Agilent 53220A LXI Interface

Figure 8:  Setting the LXI Driver Shortcut WinSock Interface Parameters


Referring to figure 9, create two IO Table procedures, one for sending commands to the LXI instrument (Send) and one to receive responses from the LXI instrument (Receive).  The ATEasy online "Getting Started" manual has a section in the Drivers and Interfaces chapter that goes into detail of how to create IO Table procedures.  Following that process, create a new IO Table procedure, and name it "Send".  Insert an IO table "Output" operation, and define it as a "Parameter to ASCII" type operation.  Insert another operation and configure it as a "Send" operation.  The Send IO Table procedure will accept ASCII text as input, and write the text to the instrument specified by the driver shortcut's interface parameters - remote port 5025, address 169.254.4.32 in this example.

Create another new IO Table procedure, and name it "Receive".  Insert an IO table "Receive" operation.  Add another operation and configure it as an "Input", "ASCII to Parameter" type operation.  The Receive IO Table procedure will receive ASCII text from the LXI instrument at the specified address, and save the text into the variable referenced in the procedure.

Generic Send/Receive IO Table Procedures

Figure 9:  Generic IO Table Send/Receive Procedures


To utilize the ATEasy command completion feature, you can create ATEasy Commands.  Commands are user defined statements that call associated procedures defined within the ATEasy application.  Once defined, typing the command's name, LXI in this instance, pops up the ATEasy code completion window, allowing you to navigate the various syntax options of the command tree.  Here, in Figure 10, two commands are defined, "Send" and "Receive", and attached to the IO Table Send and Receive procedures, respectively.  The syntax to send a text command using the newly created ATEasy Command is "LXI Send("text String")"

Attaching Command to the Send/Receive IO Table Procedures

Figure 10:  Attaching Command to the IO Table Send/Receive Procedures


One of the more common problem areas experienced with text-based communication is correctly setting the I/O termination parameters.  ATEasy supports a variety of I/O termination options.  The Interfaces tab of the Driver properties provides a drop list of defined termination options - see Figure 11.  The 53220A instrument this article was based on uses a line feed character (ASCII(10)), or escape sequence "\n") for both input and output termination.  Other options are carriage return (ASCII(13), escape sequence "\r"), both carriage return and line feed, period (".") and None.  

Note:  For the 53220A, experimentation demonstrated that the text communication would hang or time out if the wrong termination was selected.

Setting IO Table Termination

Figure 11:  Setting IO Table Send/Receive Termination


A useful tool for verifying communication using IO Tables is the ATEasy Monitor.  This built-in ATEasy utility will capture and display the text strings sent and received between ATEasy IO Table procedures and the instruments utilizing the IO Table driver.  If, for example, you can verify text commands are being sent to an instrument, but queries go unanswered, it's a good indication that the termination character may be set incorrectly.  If there is no communication at all, then perhaps the interface parameters, such as the Remote Port or the IP Address may be invalid.  To enable the ATEasy Monitor, select it from the view menu, right-click within the Monitor window and select "Start Logging" from the list.
Right-Click to Start logging


The SCPI commands below were taken from the "Scaling Example" on page 213 of the "Keysight 53220A/53230A 350 MHz Universal Frequency Counter/Timer" manual.  A test was configured to send out the commands provided in the manual, and the exchange was captured and displayed in the Monitor window.  Note that all SCPI communication was captured, including the "*IDN?" query/response and the "Syst:Err?" query/response, not just the scaling commands.

IO Table Monitor

Figure 12:  Monitored IO Table Send/Receive Communication


If you have problems using ATEasy or the LXI instrument panel with your LXI instrument, you may be having an issue with Windows Defender firewall.  It may be necessary to change your firewall setting to allow blocked applications through the firewall, or to enable the Telnet or TCP/IP port.  Below is a link that explains the process for allowing select applications through your firewall.  The basic process is to open the Windows firewall settings, and select "Allow an app through Windows Firewall".  A dialog will show information about apps that currently are allowed through the firewall.  If you want to change app settings or add apps to the list, select "Change Settings".  See Figures 13 and 14.

How to allow apps through firewall on Windows 10

Set Firewall to Allow ATEasy Through the Firewall
Windows firewall

Figure 13:  Opening Windows Firewall


Allow apps through Windows firewall

Figure 14:  Define Rules to Allow an Applications Through Windows Firewall


Enable TCP/IP port in Windows firewall

Figure 15:  Define TCP/IP Port Allowed Through Windows Firewall


Note:  You should check with your company's security policy before making changes to your firewall settings.

Summary

LXI provides a convenient interface for communicating with benchtop ATE instrumentation.  This article demonstrated multiple processes for working with an LXI instrument over a TCP/IP interface, Web Panel, Telnet and an ATEasy driver.  Topics also covered in the article are how to create an IO Table driver, how to configure the LAN driver interface, and how to use the ATEasy Monitor utility to monitor IO Table text communication.

Controlling LXI instruments with ATEasy, Telnet or the built-in web services is not difficult, but a little knowledge can help smooth the process.

The ATEasy project discussed in this article is provided via the link below.

LXI Project
Article Date 5/2/2023 , 5/10/2023
Keywords ATEasy, LXI, Telnet, 53220A, TCP/IP, LAN


Login to rate article

Read Prior Article Read Next Article
>