Difference between revisions of "Rigol"

From YobiWiki
Jump to navigation Jump to search
(Created page with "=DS1054Z Oscilloscope= =DG1022Z Waveform generator==")
 
m
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
  +
  +
==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=
  +
==Links==
=DG1022Z Waveform generator==
 
  +
* 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]
  +
  +
==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...
  +
  +
==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>
  +
===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?
  +
  +
  +
=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 -> ...

Revision as of 09:04, 16 June 2017

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

Links

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

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

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?


DG1022Z Waveform generator

Links

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