Repository navigation
Expand file tree
/
Copy pathREADME
More file actions
38 lines (27 loc) · 1.63 KB
/
Copy pathREADME
File metadata and controls
38 lines (27 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
NOTE: I no longer use this code. The functionality has been duplicated in a new module found at https://github.com/hadmack/pyoscope
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"