GUI for automatic generator voltage tunning based on oscilloscope (Agilent Technologies MSO9404A) readout.
- Connect devices to PC.
- Setup devices as describen in Configuring udev.
- Startup the program.
- Click either 'Connect' button.
- Select devices.
- If you encounter issues with this step try running script as root (not recomended).
- After establishing connection buttons have new functions:
- Button in 'Generator' panel toggles voltage tuner
- Button in 'Oscilloscope' panel toggles data acquisistion.
- (Optional) Save recorded data using save in toolbar menu.
- Exit
The are limitations on transfer speeds beetween Oscilloscope and PC. Transfer time is an exponential function. Mostly linear below 200k samples.
Benchmarking was performed on computer with AMD Ryzen 7 3700X 8-Core Processor, so resoults may vary based on that. Record length is a quantity of points in a single acquisition.
If you cannot access your device without running your script as root follow the link: Python USBTMC Readme or are running it on Windows (untested).
- Replace 'idVendor' and 'idProduct' with values and run line to create usb- udev file:
sudo echo -e '# USBTMC instruments
# Agilent MSO7104
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="idVendor", ATTRS{idProduct}=="idProduct", GROUP="usbtmc", MODE="0666"
# Tektronix AFG3102
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{idVendor}=="idVendor", ATTRS{idProduct}=="idProduct", GROUP="usbtmc", MODE="0660"
# Devices
KERNEL=="usbtmc/*", MODE="0660", GROUP="usbtmc"
KERNEL=="usbtmc[0-9]*", MODE="0660", GROUP="usbtmc"' >> /etc/udev/rules.d/usbtmc.ruleswhere the vendor and product ID must go in hex and without the "0x" or add products of a given vendor by omiting ATTRS{idProduct} part of rule definition.
- Refresh udev
sudo udevadm control --reload-rules && sudo udevadm trigger- Disconnect and re-connect the USB device.
- Turn oscilloscope on.
- Turn generator on.
- Make sure that both devices are plugged in to controller PC and can be detected using
lsusb. - Run the script
python main.py.
- matplotlib==3.9.2
- numba==0.60.0
- numpy==2.1.0
- python_ivi==0.14.9
- python_usbtmc==0.8
- samplerate==0.2.1
- Tkinter 8.6.12
