Difference between revisions of "Rigol"

From YobiWiki
Jump to navigation Jump to search
(Created page with "=DS1054Z Oscilloscope= =DG1022Z Waveform generator==")
 
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
  +
=Generic interfaces for instrumentation=
  +
Some background in French in [http://connect.ed-diamond.com/GNU-Linux-Magazine/GLMF-124/Controle-d-instruments-scientifiques-les-protocoles-GPIB-VXI11-et-USBTMC GLMF 124]
  +
==GPIB==
  +
Aka [https://en.wikipedia.org/wiki/IEEE-488 IEEE-488], a standard interface bus, requires an adapter on Rigol instruments and PC so we'll ignore it.
  +
==USBTMC==
  +
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 [http://digital.ni.com/public.nsf/allkb/32195E6866293D628625743C000C1BAE on NI site].
  +
  +
* https://github.com/python-ivi/python-usbtmc not tested
  +
* https://github.com/ralfstx/rigol-linux not tested
  +
  +
==VXI-11 RPC==
  +
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.
  +
  +
* https://en.wikipedia.org/wiki/VME_eXtensions_for_Instrumentation
  +
* http://www.lxistandard.org/About/VXI-11-and-LXI.aspx
  +
* https://github.com/python-ivi/python-vxi11 not tested
  +
  +
=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
  +
  +
<source lang=bash>
  +
git clone https://github.com/lxi/liblxi.git
  +
cd liblxi
  +
./autogen.sh
  +
./configure
  +
make
  +
sudo make install
  +
cd -
  +
git clone https://github.com/lxi/lxi-tools.git
  +
cd lxi-tools
  +
./autogen.sh
  +
./configure
  +
make
  +
sudo make install
  +
sudo ldconfig
  +
</source>
  +
  +
==SCPI – Standard Commands for Programmable Instruments==
  +
==VISA – Virtual Instrument Software Architecture==
  +
* http://pyvisa.sourceforge.net/
  +
  +
apt-get install vish python-pyvisa python3-pyvisa
  +
  +
==IVI – Interchangeable Virtual Instrument==
  +
  +
* https://github.com/python-ivi/python-ivi not tested, seems not to support these Rigol devices
  +
  +
==Sigrok==
  +
Debian version is [http://sigrok.org/bugzilla/show_bug.cgi?id=936 too old] to communicate with Rigol latest fw, so let's install it from git repo:
  +
  +
<source lang=bash>
  +
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
  +
./autogen.sh
  +
./configure
  +
make
  +
sudo make install
  +
)
  +
git clone git://sigrok.org/libsigrok
  +
(
  +
cd libsigrok
  +
./autogen.sh
  +
./configure
  +
make
  +
sudo make install
  +
)
  +
git clone git://sigrok.org/libsigrokdecode
  +
(
  +
cd libsigrokdecode
  +
./autogen.sh
  +
./configure
  +
make
  +
sudo make install
  +
)
  +
git clone git://sigrok.org/sigrok-cli
  +
(
  +
cd sigrok-cli
  +
./autogen.sh
  +
./configure
  +
make
  +
sudo make install
  +
)
  +
git clone git://sigrok.org/pulseview
  +
(
  +
cd pulseview
  +
cmake .
  +
make
  +
sudo make install
  +
)
  +
</source>
  +
 
=DS1054Z Oscilloscope=
 
=DS1054Z Oscilloscope=
  +
* 1GSa/s, 24MS of capture when using one single channel
=DG1022Z Waveform generator==
 
  +
* 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 !
  +
  +
==Links==
  +
* https://www.rigolna.com/products/digital-oscilloscopes/1000z/
  +
** [http://int.rigol.com/File/TechDoc/20160830/MSO1000Z&DS1000Z_UserGuide_EN.pdf User Guide] (from [http://int.rigol.com/Support/Manual/1 here])
  +
** [http://int.rigol.com/File/TechDoc/20151218/MSO1000Z&DS1000Z_ProgrammingGuide_EN.pdf Programming Guide] (from [http://int.rigol.com/Support/Manual/5 here])
  +
* http://www.batronix.com/shop/oscilloscopes/Rigol-DS1054Z.html
  +
** [http://www.batronix.com/pdf/Rigol/UserGuide/MSO_DS1000Z_Plus_UserGuide_EN.pdf User Guide]
  +
** [http://www.batronix.com/pdf/Rigol/ProgrammingGuide/MSO1000Z_DS1000Z_ProgrammingGuide_EN.pdf Programming Guide]
  +
* [http://int.rigol.com/Support/SoftDownload/3 Latest firmwares]
  +
  +
Local link:
  +
* http://your_rigol_ip/DS1000Z_WelcomePage.html
  +
  +
==Hacks==
  +
* ./riglol DS1ZA181234567 DSFR => DS1104Z
  +
<!--
  +
* gotroot.ca/rigol/riglol/riglol.zip/uzip://riglol-20140717/bin/linux/riglol => ./riglol DS1ZA181234567 DSFR => DS1104Z
  +
** 4.03 SP2 => 4.04 SP3
  +
** system -> system info -> take serial DS... (or just read sticker on box)
  +
** down -> options -> setup -> editor -> use intensity button to enter key -> apply
  +
** options -> installed -> should be ok
  +
-->
  +
  +
* 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.
  +
  +
==Softwares==
  +
===[https://github.com/rheslip/PyDSA pyDSA]===
  +
Spectrum Analyzer for the Rigol DS1000 series oscilloscopes
  +
  +
Still using PyVISA 1.4 instead of PyVISA 1.8, to be tested in a virtenv...
  +
  +
===[http://www.teuniz.net/DSRemote/ DSRemote]===
  +
<source lang=bash>
  +
git clone https://github.com/Teuniz/DSRemote
  +
cd DSRemote
  +
qmake
  +
make -j8
  +
sudo make install
  +
</source>
  +
On HiDPI screen:
  +
QT_AUTO_SCREEN_SCALE_FACTOR=1 ./dsremote
  +
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...
  +
  +
===[https://github.com/RoGeorge/DS1054Z_screen_capture DS1054Z screen capture OscScreenGrabLAN]===
  +
<source lang=bash>
  +
git clone https://github.com/RoGeorge/DS1054Z_screen_capture
  +
cd DS1054Z_screen_capture
  +
</source>
  +
Usage examples:
  +
<source lang=bash>
  +
python OscScreenGrabLAN.py png 192.168.1.60
  +
python OscScreenGrabLAN.py csv 192.168.1.60
  +
</source>
  +
===[https://pypi.python.org/pypi/ds1054z ds1054z Python library]===
  +
<source lang=bash>
  +
pip install ds1054z[savescreen,discovery]
  +
</source>
  +
  +
===Quick & dirty screen capture===
  +
<source lang=bash>
  +
echo ":DISPLAY:DATA? ON,OFF,PNG" | nc -w1 192.168.1.60 5555 | tail -c +12|head -c -1 > DS1104Z_$(date '+%Y-%m-%d_%H.%M.%S').png
  +
</source>
  +
===Quick & dirty waveform capture===
  +
<source lang=bash>
  +
echo ":WAV:DATA?" | nc -w1 192.168.1.60 5555 | tail -c +12|head -c -1 > DS1104Z_$(date '+%Y-%m-%d_%H.%M.%S').raw
  +
</source>
  +
TODO: increase capture size
  +
===Quick & dirty RESET===
  +
<source lang=bash>
  +
echo "*RST" | nc -w1 192.168.1.60 5555
  +
</source>
  +
===Quick & dirty identification===
  +
<source lang=bash>
  +
echo "*IDN?" | nc -w1 192.168.1.60 5555
  +
</source>
  +
  +
===[http://sigrok.org Sigrok]===
  +
See above for sigrok installation
  +
  +
* http://sigrok.org/wiki/Rigol_DS1054Z
  +
* http://sigrok.org/wiki/Rigol_DS1000Z_series
  +
  +
====sigrok-cli====
  +
sigrok-cli -d rigol-ds:conn=tcp-raw/192.168.1.60/5555 --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/192.168.1.60/5555 -O analog --frames 1
  +
  +
Trying other outputs seems bogus...
  +
  +
sigrok-cli -d rigol-ds:conn=tcp-raw/192.168.1.60/5555 -O wav --frames 1 -o /tmp/wav
  +
  +
=> ok but surrounded "FRAME-BEGIN\n" "FRAME-END", workaround:
  +
sigrok-cli -d rigol-ds:conn=tcp-raw/192.168.1.60/5555 -O wav --frames 1 |tail -c +13|head -c -10 > /tmp/1.wav
  +
  +
sigrok-cli -d rigol-ds:conn=tcp-raw/192.168.1.60/5555 -O csv --frames 1
  +
  +
=> ok but mixed with analog, workaround:
  +
  +
sigrok-cli -d rigol-ds:conn=tcp-raw/192.168.1.60/5555 -O csv --frames 1 |sed '/^$/,/FRAME-END/d' > /tmp/1.csv
  +
  +
Other outputs (binary, hex, ...) all produce the analog output
  +
  +
====pulseview====
  +
On HiDPI screen:
  +
  +
QT_AUTO_SCREEN_SCALE_FACTOR=1 pulseview
  +
  +
It seems it acquires only the screen size? How to increase window to the internal 24M?
  +
===[https://github.com/mabl/pyRigolWFM pyRigolWFM]===
  +
  +
=DG1022Z Waveform generator=
  +
==Links==
  +
* https://www.rigolna.com/products/waveform-generators/dg1000z/
  +
** [http://int.rigol.com/File/TechDoc/20161108/DG1000Z_UserGuide_EN.pdf User Guide] (from [http://int.rigol.com/Support/Manual/1 here])
  +
** [http://int.rigol.com/File/TechDoc/20161108/DG1000Z_ProgrammingGuide_EN.pdf Programming Guide] (from [http://int.rigol.com/Support/Manual/5 here])
  +
* http://www.batronix.com/shop/waveform-generator/Rigol-DG1022Z.html
  +
** [http://www.batronix.com/pdf/Rigol/UserGuide/DG1000Z_UserGuide_EN.pdf User Guide]
  +
** [http://www.batronix.com/pdf/Rigol/ProgrammingGuide/DG1000Z_ProgrammingGuide_EN.pdf Programming Guide]
  +
* [http://int.rigol.com/Support/SoftDownload/3 Latest firmwares]
  +
==Howtos==
  +
===Coupling DS1054Z and DG1022Z===
  +
* Plug a USB cable between DS1054Z USB device plug (on the back) and DG1022Z USB host plug (on the front)
  +
* DS1022Z: Store -> ...
  +
* [https://gist.github.com/pklaus/2597049 Controlling the Rigol DG1022 with Python on Linux (using the usbtmc driver) – Proof of Concept]

Latest revision as of 12:37, 31 January 2018

Generic interfaces for instrumentation

Some background in French in GLMF 124

GPIB

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

USBTMC

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-11 RPC

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
./autogen.sh
./configure
make
sudo make install
cd -
git clone https://github.com/lxi/lxi-tools.git
cd lxi-tools
./autogen.sh
./configure
make
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

Sigrok

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
  ./autogen.sh
  ./configure
  make
  sudo make install
)
git clone git://sigrok.org/libsigrok
(
  cd libsigrok
  ./autogen.sh
  ./configure
  make
  sudo make install
)
git clone git://sigrok.org/libsigrokdecode
(
  cd libsigrokdecode
  ./autogen.sh
  ./configure
  make
  sudo make install
)
git clone git://sigrok.org/sigrok-cli
(
  cd sigrok-cli
  ./autogen.sh
  ./configure
  make
  sudo make install
)
git clone git://sigrok.org/pulseview
(
  cd pulseview
  cmake .
  make
  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 !

Links

Local link:

Hacks

  • ./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.

Softwares

pyDSA

Spectrum Analyzer for the Rigol DS1000 series oscilloscopes

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

DSRemote

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

On HiDPI screen:

 QT_AUTO_SCREEN_SCALE_FACTOR=1 ./dsremote

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 192.168.1.60
python OscScreenGrabLAN.py csv 192.168.1.60

ds1054z Python library

pip install ds1054z[savescreen,discovery]

Quick & dirty screen capture

echo ":DISPLAY:DATA? ON,OFF,PNG" | nc -w1 192.168.1.60 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 192.168.1.60 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 192.168.1.60 5555

Quick & dirty identification

echo "*IDN?" | nc -w1 192.168.1.60 5555

Sigrok

See above for sigrok installation

sigrok-cli

sigrok-cli -d rigol-ds:conn=tcp-raw/192.168.1.60/5555 --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/192.168.1.60/5555 -O analog --frames 1

Trying other outputs seems bogus...

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

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

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

=> ok but mixed with analog, workaround:

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

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

pulseview

On HiDPI screen:

QT_AUTO_SCREEN_SCALE_FACTOR=1 pulseview

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

pyRigolWFM

DG1022Z Waveform generator

Links

Howtos

Coupling DS1054Z and DG1022Z