Skip to content

Native Python library for accessing USBTMC test equipment

License

Notifications You must be signed in to change notification settings

electrodynatronic/pyusbtmc

 
 

Repository files navigation

PyUSBtmc is a simple library for interacting with test equipment (primarily Rigol oscilloscopes).

It was conceived of by Matt Mets in 2010, and is distributed under the MIT License. See LICENSE for a copy of this license.

The PyUSBtmc project is in no way affiliated with Rigol Technologies Inc.

PyUSBtmc interacts with USBtmc compliant instruments through the linux kernel's usbtmc character device driver.  The first USBtmc device is automatically mapped by the linux kernel to /dev/usbtmc0 which may be interacted with in the usual unix way.  For example:
echo "*IDN?" > /dev/usbtmc0; cat /dev/usbtmc0
will send the standard IEEE command for the device to identify itself.

Project Home: https://github.com/hadmack/pyusbtmc

Dependancies
------------
python 2.6 or later
linux kernel 2.6.36 or later
numpy
matplotlib

Setup USB permissions for udev
------------------------------
echo 'ACTION=="add", BUS=="usb", SYSFS{idVendor}=="1ab1", SYSFS{idProduct}=="0588", GROUP:="adm"' > tmpfile
sudo chown root:root tmpfile
sudo mv tmpfile /etc/udev/rules.d/10-rigol.rules
sudo udevadm control --reload-rules

NOTES
-----
On my DS1102E the WAVE:POINT:MODE options seem to have no effect.  Maybe the firmware is out of date.

udev can add more symlinks with SYMLINK+="usbtmc-newname"

new udev rules
ACTION=="add", BUS=="usb", SYSFS{idVendor}=="164e", SYSFS{idProduct}=="0fa2", GROUP:="adm", SYMLINK+="usbtmc-bnc645"
ACTION=="add", BUS=="usb", SYSFS{idVendor}=="1ab1", SYSFS{idProduct}=="0588", GROUP:="adm", SYMLINK+="usbtmc-rigol"

About

Native Python library for accessing USBTMC test equipment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%