Project logo

Virtual Instrument Lab Library

Virtual Instrument Control Library.

PyViLab-Lib Readme


PyViLab-Lib provides a pure python library for software control of laboratory instruments.


  • Python (tested with 3.8+)
  • All package requirements are listed in requirements file
  • For the proper functioning of the matplotlib library needed in some projects /examples folder we need GUI backend outside virtual environment via installing tkinter: sudo apt-get install python3-tk


To install this software you have to clone repository. (see package details)

git clone

Configuring udev

In case you cannot access your device, then you need to create an udev rule to properly set the permissions of the device. First connect your device and run lsusb. Then find the vendor and product IDs of your device.

Steps to creating rules file:

  1. create group usbtmc: sudo addgroup usbtmc
  2. add yourself in group usbtmc: sudo usermod -a -G usbtmc <userName>
  3. place file 50-rigol.rules in location /etc/udev/rules.d/ with this content altered with your device IDs:
 # USBTMC instruments
 # Rigol DM3068
 SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="1ab1", ATTRS{idProduct}=="0c94", GROUP="usbtmc", MODE="0666", SYMLINK="usbtmc%n"
 # Rigol DG1022A
 SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="0400", ATTRS{idProduct}=="09c4", GROUP="usbtmc", MODE="0666", SYMLINK="usbtmc%n"
 # Rigol DS2072A
 SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="1ab1", ATTRS{idProduct}=="04b0", GROUP="usbtmc", MODE="0666", SYMLINK="usbtmc%n"
 # Rigol DS1202Z-E
 SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="1ab1", ATTRS{idProduct}=="0517", GROUP="usbtmc", MODE="0666", SYMLINK="usbtmc%n"
  1. logout and login to activate membership in usbtmc group or if you want to reload udev rules without logout: sudo udevadm control --reload-rules && udevadm trigger

Example code

All example codes for each instrument are available on GitLab (see package in the examples folder)

Contributors 2

Daniel Galbička 88.24%

Juraj Ďuďák 11.76%



  • Python 100%

  • Library
    Last update

    2022-05-10 14:59:21

    Created at