• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
  • Advertise
  • Subscribe

Test & Measurement Tips

Oscilloscopes, electronics engineering industry news, how-to EE articles and electronics resources

  • Oscilloscopes
    • Analog Oscilloscope
    • Digital Oscilloscope
    • Handheld Oscilloscope
    • Mixed-signal Oscilloscope
    • PC-based Oscilloscopes – PCO
  • Design
  • Calibration
  • Meters & Testers
  • Test Equipment
  • Learn
    • eBooks/Tech Tips
    • FAQs
    • EE Training Days
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Video
    • EE Videos
    • Teardown Videos
  • Resources
    • Design Guide Library
    • Digital Issues
    • Engineering Diversity & Inclusion
    • Leap Awards
    • White Papers
  • Subscribe
You are here: Home / Featured / LXI or LAN extensions basics for instrumentation and SCPI

LXI or LAN extensions basics for instrumentation and SCPI

September 20, 2018 By David Herres Leave a Comment

Keysight Technologies conceived of LAN Extensions for Instrumentation (LXI) in 2005 as a way to enable test and measurement interfaces using web servers in conjunction with Ethernet. LXI is used extensively in connecting computers and electronic test equipment, particularly oscilloscopes.

Local Area Network (LAN)-enabled instruments can connect to a computer, using as a medium the user-friendly Ethernet protocol. This has been done for years, but the LXI innovation established a standardized behavior for any instrument when connecting over a LAN. The LAN can be wired or wireless. It is compatible with multiple protocols and web servers may be embedded in the individual instruments.

Numerous types of instrumentation can employ LXI to connect to devices – everything from power supplies to solar array simulators. Prominent among these instruments are oscilloscopes and spectrum analyzers.

LXI instrument statistics
LXI usage statistics. Source: http://lxistandard.org

Prior to the development of LXI, the General Purpose Interface Bus (GPIB) was the usual interface. After LXI emerged in 2005, this faster, more efficient and less costly alternative became the tool of choice for computer-to-instrument connectivity.

The trend is toward higher speeds. Currently, LXI instruments are available with Ethernet speeds of 100 Mb/sec and 1 Gb/sec. These limits will be exceeded in the near future. Because of backward compatibility, existing systems will never become obsolete.

Currently, all LXI enabled devices adhere to what is known as the LXI core. These devices connect in a uniform manner to any LAN, and the end products have in common:

  • Open industry standards – LXI includes TCP/IP, Ethernet, Ipv4/Ipv6, web browsers and IVI drivers.
  • High-speed Ethernet I/O, which provides backward compatibility and universal connectivity. Today’s computers invariably include Ethernet ports, and networking hardware is readily available.
  • Internal web interface. The LXI standard mandates that instruments support W3C-compliant browsers.
LXI capabilities
LXI capabilities, source: http://lxistandard.org

Taking advantage of the web interface, the user can configure and operate instruments from an embedded web server GUI. Data can be collected and analyzed without additional programming. Instruments, confined to the LAN, can be operated remotely within the LAN or, connected to the Internet, they may be operated remotely throughout the world.

LXI devices universally contain an Interchangeable Virtual Instrument (IVI) driver, which provides a consistent programming interface. LXI software is comprehensive and reliable. However, the individual device manufacturers furnish proprietary software that is unique to each device. Through no fault of LXI, some aspects of this manufacturer-supplied, device-specific software are often found to be deficient. For this reason, and because LXI is an open standard, many users choose to create their own instrument-specific software. Linux and Mac command lines permit text programming compatible with a TCP connection.

Here’s an example, using the Telnet command line tool to connect to a Rigol DSA815 oscilloscope:

$ telnet 192.168.1.126 5555
Trying 192.168.1.126…
Connected to 192.168.1.126.
Escape character is ‘^]’.
*IDN?
Rigol Technologies,DSA815,DSA8A154402661,00.01.07.00.01

Here is the code for a frequency response plot from 100 kHz to 10 MHz using the internal tracking generator:

# enable tracking generator output
:OUTP 1
# average 1000 measurements
:TRACE:AVER:COUN 1000
# frequency range from 0 to 10 MHz
:SENSe:FREQ:START 10000
:SENSe:FREQ:STOP 10000000

Most problems are easily resolved, but it is possible to have a hardware difficulty that requires extensive component substitution. That can get expensive, but the good news is that most problems are either in the software or they are procedural.

One common fault is that on the front panel of an LXI device, the LAN status indicator reads FAULT. Possible causes are a faulty LAN cable or a faulty termination. Ohmmeter readings are not definitive because there may appear to be electrical continuity while the signal path is problematic. In a long cable run, media can be pinched due to over-tightened support hardware, causing an impedance mismatch. The answer is to replace the cable with a known good piece.

Check that the switch or router is ON.

The LAN status will read FAULT if the LXI device is trying to use the wrong IP address. If the Discovery Tool finds the LXI device but can’t access the web page, it is possible that the IP address does not match the subnet of the computer. The solution is to activate the LCI mechanism (LAN reset). This should align the LXI device IP address and the computer subnet. If that does not work, an alternate solution may be to configure the computer to use DHCP or to use a static IP address and subnet mask matching the subnet of the LXI device.

Test and measurement instruments that comply with the LXI specification include an internal web server that responds to an http request directed to its IP address. Then, without drivers, the instrument is prepared to respond to Standard Commands for Programmable Instruments (SCPI).

SCPI facilitates communication over LXI by providing syntax, command structure, and data transfer protocol. As in all programming, the user must be aware of conventions that govern the use of the language. For example, in writing a command, the first three letters are written in uppercase and they define the action. The lowercase letters are optional and may be included for clarity. Two common SCPI commands are MEAsure and CONfigure.

Generic commands, independent of any specific instrument, can be issued, and this makes switch-and-play possible without code revision.

Specific media are not required. SCPI works with RS-232, Ethernet, LXI, USB, PXI, VXIbus and others.

SCPI is comprised of two fundamental command types: common commands and instrument control commands. Common commands do not relate to a specific instrument. Examples are RESET and ESR? which queries the status of the event register. Instrument control commands are discussed in detail along with common commands at na.Support.keysight.com.

One of the weaknesses of GPIB, in contrast to IVI, was that commands were not standardized. There were many vendors, and they tended to determine commands and actions without regard to differing models. Engineers could not know what commands would do in programming the many extant instruments.

Standard Commands for Programmable Instrumentation (SCPI) resolved these uncertainties. Proposed by Hewlett-Packard in 1990 and managed by the SCPI Consortium, it evolved under IVI Foundation management and succeeded in defining a signal-oriented language that instruments could interpret without latency.

SCPI has gained increasingly wide currency thanks to its outstanding interoperability and user-friendly nature. Without the need of drivers, the ASCII commands are performed by the instruments, minimizing the opportunity for error. That being said, we must recognize the SCPI cannot compete with IVI drivers in terms of speed, so it is a question of setting priorities in a proposed system.

Instruments receive SCPI commands in the form of a Set operation or a Query operation. All queries end with a question mark. A set will command an instrument to perform a specific operation such as Power On or Power Off. A query will request data such as a voltage or current level. Some commands can be both set and query.

A common command configuration is a hierarchy or tree. Within a tree successive commands are separated by colons. A voltage or current measurement query is a hierarchical command and as such takes the form MEASure:VOLTage:DC? Or MEASure:CURRent: AC? If these commands are combined, they are separated by a semicolon. The actual command is the upper-case portion. The lower-case letters are for clarity and may be omitted.

Arguments consist of additional command text that clarifies the overall intent. They occur after the command, separated by a space.

IVIfoundation.org publishes on its website a PDF titled Standard Commands for Programmable Instruments. Volume 1 is Syntax and Style. This document states explicitly that by following a set of simple guidelines, a programmer can reduce the number of errors encountered when using SCPI instruments. Some guidelines are:

  1.  Avoid sending default nodes. Default nodes are used within SCPI to allow the language to grow. Thus, older instruments will not have implemented the default node. A command is more likely to work with more instruments if the default nodes are omitted.
  2. Avoid sending a numeric suffix of 1 in applications that only use the default capability. An instrument with multiple capabilities is required to interpret a header without the numeric suffix as if a numeric suffix of one had been used. Leaving off the numeric suffix means the same commands will work with an instrument that has multiple capabilities and an instrument that does not.
  3. Be careful when sending coupled commands. If the coupled commands are contiguous in the same program message, the instrument is more likely to resolve any conflict between the current settings and the new settings.
  4. Verify instrument settings when knowing their exact value is required. If the actual value of a setting is important, query the setting after programming it. An instrument is required to round parameters.
  5. Send commands and queries in different program messages. The response from a query combined in a program message with commands that affect the queried value is not predictable.
  6. Use the highest level commands possible for compatibility across instruments. Whenever feasible, use the MEASure, CONFigure, READ?, FETCh?, and INITiate commands. Use the lower level commands only when a special characteristic of an instrument must be manipulated.

You may also like:


  • Working with the PicoScope PC-based oscilloscope

  • Making noise figure measurements with handheld analyzers

  • Making measurements with Matlab

  • VIDEO: Connecting An Oscilloscope To The Internet

Filed Under: FAQ, Featured, Test Equipment, Test software programming Tagged With: keysighttechnologies

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Featured Contributions

Why engineers need IC ESD and TLP data

Verify, test, and troubleshoot 5G Wi-Fi FWA gateways

How to build and manage a top-notch test team

How to use remote sensing for DC programmable power supplies

The factors of accurate measurements

More Featured Contributions

EE TECH TOOLBOX

“ee
Tech Toolbox: 5G Technology
This Tech Toolbox covers the basics of 5G technology plus a story about how engineers designed and built a prototype DSL router mostly from old cellphone parts. Download this first 5G/wired/wireless communications Tech Toolbox to learn more!

EE TRAINING CENTER

EE Learning Center

EE ENGINEERING TRAINING DAYS

engineering
“test
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.
“bills

RSS Current EDABoard.com discussions

  • Right Half Plane Zero
  • dc-dc converter in series
  • Single ended measuring ports and balanced antenna
  • Thermal modelling of repetitive power pulse
  • Permittivity and Permealibility in CST

RSS Current Electro-Tech-Online.com Discussions

  • Microinverters and storeage batteries?
  • Fun with AI and swordfish basic
  • FFC connector white
  • Is AI making embedded software developers more productive?
  • Can I make two inputs from one??
Search Millions of Parts from Thousands of Suppliers.

Search Now!
design fast globle

Footer

EE World Online Network

  • 5G Technology World
  • EE World Online
  • Engineers Garage
  • Analog IC Tips
  • Battery Power Tips
  • Connector Tips
  • DesignFast
  • EDA Board Forums
  • Electro Tech Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips

Test & Measurement Tips

  • Subscribe to our newsletter
  • Advertise with us
  • Contact us
  • About us

Copyright © 2025 · WTWH Media LLC and its licensors. All rights reserved.
The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media.

Privacy Policy