There are many options for people considering remote communication and control of test and measurement instrumentation. In most cases, a computer is used to communicate to test instrumentation using USB or LAN connections. The computer can configure the instruments, collect and organize data, and present it in a useful and flexible way.
Remote control provides:
- Increased repeatability: The instrumentation is set up the same way, every time.
- Efficient data collection: Data can be automatically filtered and stored.
- Easily configure the test system parameters: Each command is executed in the same order and in the same timeframe.
- Quickly visualize system performance: Graphical or tabular data formatting is easy.
There are numerous platforms (Windows, Linux, etc..) and software programs (LabVIEW, .NET, Python) available to build automated test systems. The right choice for your application is highly dependent on your needs and the available skills you have.
In this note, we are going to discuss how to use LXI Tools to communicate with SIGLENT instrumentation. LXI Tools is an open source software application that uses the local area network (LAN) connection to quickly control remote instrumentation. It is easy to install, has a small operating footprint, and is really powerful while being quite easy to use. Let’s start by looking at the basics.
You can also see the video version of this note here: https://www.siglentamerica.com/video/lxi-tools/
Why Open Source?
Open source coding is a community-based development style in which a group of contributors work together to build and maintain programs using shared code and components. In this way, a platform can be built and tested quickly and may cost significantly less than commercial programming environments. LXI Tools is free open source software and the project welcomes new contributors that would like to help improve the tools.
Here is a link to the LXI Tools website: https://lxi-tools.github.io
Why LXI Tools?
LXI-Tools is a collection of open source software tools that provide direct control of LXI compatible instruments such as modern oscilloscopes, power supplies, spectrum analyzers, and more.Simply install LXI Tools, connect your instrument, and start communicating.
It really is that easy.
- Quickly discover the available instruments on the LAN
- Retrieve copies of the displayed images (quickly see signals, data, and instrumentation setups) and convert image file types
- Benchmark LAN performance
- Send individual commands to an instrument to perform simple test actions. For example, you could return the measured data from a DMM.
To learn more about LXI-Tools, please see https://github.com/lxi-tools/lxi-tools
- Install the appropriate version of LXI-Tools for your operating system
2. Open a terminal. In this example, I am using Ubuntu (17.10) running on a virtual machine hosted by a Win 10/64 bit OS.
To learn more about the virtual machine used in this example:https://www.virtualbox.org/
The OS is Ubuntu: https://www.ubuntu.com/
3. Once loaded, startup Linux:
With Ubuntu, you can use Snap to install:
$ snap install lxi-tools
Quickly searches the LAN for instruments and lists their identification string and IP address.
Plug in and power on your instrumentation and make sure that they are connected to a working LAN connection. You can manually check the instrument IP address and save this info to compare to later steps.
Open up a terminal window. At the “$” prompt, simply type lxi discover… LXI tools will search the LAN for connected instruments.
Here, we have three devices connected: an SDM3065X, SSA3032X, and an SDS1102X-E (which has been superseded by the SDS1202X-E series here in North America). It also includes the instrument serial number, firmware revision, and IP address.
NOTE: This has been tested with a large number of instruments, but may not be supported by some. There is a list of compatible instruments at the end of this note or you can check LXI-Tools support for the latest list of supported products.
This function retrieves a copy of the instrument display and saves it to the local drive. This is ideal for adding information to reports and sharing events with colleagues.
Type “lxi screenshot – – address <device address>”
NOTE: There should be two “-” with no spaces before “address” for every command.
Image Edits using ImageMagicks
Use ImageMagick® to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, TIFF, DPX, EXR, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.
For more information, visit… https://www.imagemagick.org/script/index.php
$ lxi screenshot –address <ip> – | convert – screenshot.jpg
$ lxi screenshot –address <ip> – | convert – screenshot.tiff
$ lxi screenshot –address <ip> – | convert – screenshot.bmp
The benchmark command sends 100 requests via LAN and measures the average response time of the instrument. It can be used as a gauge for the health of the connection. Higher response rates = faster links.
$ lxi benchmark –address <ip>
Manual vs. Auto-load:
The commands can also be manually or auto-loaded:
$ lxi screenshot –address 10.0.0.42
Vs. manually specifying which screenshot plugin to use:
$ lxi screenshot –address 10.0.0.42 –plugin siglent-ssa3000x
The only advantage of manually specifying which plugin to use it that it is a bit faster because it does not go through the instrument auto detection steps (retrieve ID, parse regex rules to match correct plugin etc.).
Sending instrument specific commands:
You can also use the SCPI command to send any command to the instrument.
Note that if you have an SCPI command with spaces you must remember to send the specific command in quotes like so:
$ lxi scpi –address 192.168.55.113 “MEAS:VOLT? CH1”
This way the tool knows how to parse the full SCPI string.
In this example, we send the “READ?” command to an SDM and return a reading:
Another really great feature is the GUI for LXI Tools. This allows you easy access to discovery of instruments on the network as well as some powerful tools for data capture and instrument control.
This adds a very simple yet powerful graphical interface for the LXI tools program:
NOTE: Ignore the “Qt” error shown.
This opens a clean control window:
- Search: Discover the instruments connected to the LAN. Here, we have three instruments connected:
- SCPI command line: Send instrument specific commands. Click on the instrument you wish to communicate with and then enter the command. For queries (commands that require an instrument response, or read function), the returned string will be shown in the text box:
NOTE: The specific commands that can be used are available in the instrument programming guide. Check out the specific instrument documentation for more details.
This tool can be helpful when trying out specific sequences of commands. You can send them one-at-a-time and then observe the instrument functionality.
- Screenshot: Capture and save an image from the instrument. This also features a “live” button that will continuously poll the instrument.
After saving, you can recall the image:
- Benchmark: Checks the performance of the LAN connection by sending a series of commands and measuring the response time. Larger “requests/second” = greater possible bus performance.
- Data Recorder: Sends the user-defined command a number of times/second and attempts to graph the data. Be aware that data can be returned in different formats and at different rates depending on device configuration. Going faster can make the system unstable and could cause a crash or hang-up.
And the data:
- Settings: Configure the timeouts and other controls.
- About: Version info.
*Here is a list of the latest compatible instruments tested with Lxi-Tools (03/13/2018)
SSA3000X (Latest 126.96.36.199a)
SDS1202X-E (Older 188.8.131.52R2)
SDS1202X-E (Latest 184.108.40.206)
SDS1204X-E (Latest/first production release 220.127.116.11)
SDS1202X+ (Latest 18.104.22.168E3)*
*LIMITED COMMAND SET AVAILABILITY
SDS2304X (Older 22.214.171.124)*
SDS2304X (Latest 126.96.36.199R10)*
*LIMITED COMMAND SET AVAILABILITY
SDS2000 Series (replaced by the SDS2000X):
SDS2204 (Latest 188.8.131.52)*
*LIMITED COMMAND SET AVAILABILITY
SDM3045X (Older rev 5.01.01.01)
SDM3045X (Latest rev 5.01.01.03)
SDM3055 (Latest rev 1.01.01.01.19)
SDM3065X (Older rev 3.01.01.02)
SDM3065X (Latest rev 3.01.01.03)
SDG1032X (Latest 1.01.01.22R5)
SDG6052X (Latest 6.01.01.28R1): 405.3