Skip to content

hadmack/pyoscope

Repository files navigation

PyOscope is a library for interacting with oscilloscopes and other test equipment.  

PyOscope was developed by Michael Hadmack (c) 2011
This code is distributed under the MIT License. See LICENSE for a copy of this license.

This is a fork of PyUSBtmc by Matt Mets (c) 2010.
PyOscope extends the functionality of PyUSBtmc with an abstract Scope class with a generic interface.

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

Presently PyOscope is able to interact with USBtmc compliant instruments using 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.
See below for how to set the device permissions properly in Linux

This library also contains a driver to interact with National Instruments ENET/GPIB modules over ethernet.

The Rigol and Waverunner classes show examples of how to use this library with various types of instruments.

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

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

Generic Oscilloscope Control Class for Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages