From YobiWiki
Jump to navigation Jump to search

Generic interfaces for instrumentation

Some background in French in GLMF 124


Aka IEEE-488, a standard interface bus, requires an adapter on Rigol instruments and PC so we'll ignore it.


USBTMC is a protocol built on top of USB that allows GPIB-like communication with USB devices. From the user's point of view, the USB device behaves just like a GPIB device. See more on NI site.


VXI stands for VME eXtensions for Instrumentation

VXI-11 is a TCP/IP instrument protocol specification defined by the VXIbus Consortium. Since LXI instruments are based on Ethernet, the TCP/IP interface allows you to communicate with an LXI instrument using the VXI-11 interface.

Generic software for instrumentation

There are different standard APIs/layers to talk to a compatible device:

LXI – LAN Extensions for Instrumentation

See https://lxi.github.io/ and https://github.com/lxi/lxi-tools

git clone https://github.com/lxi/liblxi.git
cd liblxi
sudo make install
cd -
git clone https://github.com/lxi/lxi-tools.git
cd lxi-tools
sudo make install
sudo ldconfig

SCPI – Standard Commands for Programmable Instruments

VISA – Virtual Instrument Software Architecture

apt-get install vish python-pyvisa python3-pyvisa

IVI – Interchangeable Virtual Instrument


Debian version is too old to communicate with Rigol latest fw, so let's install it from git repo:

sudo apt-get install git-core gcc g++ make autoconf autoconf-archive automake libtool pkg-config libglib2.0-dev libglibmm-2.4-dev libzip-dev libusb-1.0-0-dev libftdi-dev check doxygen python-numpy python-dev python-gi-dev python-setuptools swig default-jdk libieee1284-3-dev libqt4-dev libboost-test-dev libboost-thread-dev libboost-filesystem-dev libboost-system-dev libqt5svg5-dev
git clone git://sigrok.org/libserialport
  cd libserialport
  sudo make install
git clone git://sigrok.org/libsigrok
  cd libsigrok
  sudo make install
git clone git://sigrok.org/libsigrokdecode
  cd libsigrokdecode
  sudo make install
git clone git://sigrok.org/sigrok-cli
  cd sigrok-cli
  sudo make install
git clone git://sigrok.org/pulseview
  cd pulseview
  cmake .
  sudo make install

DS1054Z Oscilloscope

  • 1GSa/s, 24MS of capture when using one single channel
  • 500MSa/s, 12MS of capture when using two channels
  • 250MSa/s, 6MS of capture when using three or four channels

Using means displaying or using as trigger !


Local link:


  • ./riglol DS1ZA181234567 DSFR => DS1104Z
  • Fan is moderately noisy, someone proposed to [changing fan: https://www.youtube.com/watch?v=taLTQsWEEqc replace it (youtube)] with a Gelid Silent 5
    • I've still some doubts, imho the noise comes from air flow in the box itself, not much from fan, so less noise means less air flow...
    • update: I did the change and I highly recommend the operation! It's much silent now! Vcc on middle cable, GND on cable with text.



Spectrum Analyzer for the Rigol DS1000 series oscilloscopes

Still using PyVISA 1.4 instead of PyVISA 1.8, to be tested in a virtenv...


git clone https://github.com/Teuniz/DSRemote
cd DSRemote
make -j8
sudo make install

On HiDPI screen:


See help for usage & shortcuts

To change memory depth: acq / mem depth / ... To save waveform: save / wave inspector / ... => EDF file

EDF? => apt-get install edfbrowser => no hidpi and not clear how to browse trace...

DS1054Z screen capture OscScreenGrabLAN

git clone https://github.com/RoGeorge/DS1054Z_screen_capture
cd DS1054Z_screen_capture

Usage examples:

python OscScreenGrabLAN.py png
python OscScreenGrabLAN.py csv

ds1054z Python library

pip install ds1054z[savescreen,discovery]

Quick & dirty screen capture

echo ":DISPLAY:DATA? ON,OFF,PNG" | nc -w1 5555 | tail -c +12|head -c -1 > DS1104Z_$(date '+%Y-%m-%d_%H.%M.%S').png

Quick & dirty waveform capture

echo ":WAV:DATA?" | nc -w1 5555 | tail -c +12|head -c -1 > DS1104Z_$(date '+%Y-%m-%d_%H.%M.%S').raw

TODO: increase capture size

Quick & dirty RESET

echo "*RST" | nc -w1 5555

Quick & dirty identification

echo "*IDN?" | nc -w1 5555


See above for sigrok installation


sigrok-cli -d rigol-ds:conn=tcp-raw/ --scan
The following devices were found:
rigol-ds - Rigol DS1104Z 00.04.04.SP3 with 4 channels: CH1 CH2 CH3 CH4
sigrok-cli -d rigol-ds:conn=tcp-raw/ -O analog --frames 1

Trying other outputs seems bogus...

sigrok-cli -d rigol-ds:conn=tcp-raw/ -O wav --frames 1 -o /tmp/wav

=> ok but surrounded "FRAME-BEGIN\n" "FRAME-END", workaround:

sigrok-cli -d rigol-ds:conn=tcp-raw/ -O wav --frames 1 |tail -c +13|head -c -10 > /tmp/1.wav
sigrok-cli -d rigol-ds:conn=tcp-raw/ -O csv --frames 1

=> ok but mixed with analog, workaround:

sigrok-cli -d rigol-ds:conn=tcp-raw/ -O csv --frames 1 |sed '/^$/,/FRAME-END/d' > /tmp/1.csv

Other outputs (binary, hex, ...) all produce the analog output


On HiDPI screen:


It seems it acquires only the screen size? How to increase window to the internal 24M?


DG1022Z Waveform generator



Coupling DS1054Z and DG1022Z