Tektronix Technical Forums are maintained by community involvement. Feel free to post questions or respond to questions by other members. Should you require a time-sensitive answer, please contact your local Tektronix support center here.
I've used PyVISA and matlab's implementation of VISA to talk to TekVISA and, in turn, a scope (TDS 3012B, MDO 3012).
I'd like to do the same with a raspberry pi. Does anyone have any experience with this? I'd be using PyVISA but am not sure if there is a TekVISA equivalent for linux on an ARM processor.
Yes, I have been able to control a scope from a Raspberry PI. Since there is no NI-VISA or TekVISA for Raspberry Pi, you will need to install the pyvisa-py package and use it as your back end for PyVISA. You can install pyvisa-pi using pip.
When you connect to the Resource Manager you will need to do so as follows:
Code: Select all
import visa rm = visa.ResourceManager('@py')
Note that when using this, you will not be able to run your scripts directly from IDLE (press F5) as this will run the script without root access. The script will need to run with root access in order for the PyVISA-py to access the system resources it needs so you will need to run the script from a terminal using sudo like this:
Code: Select all
sudo python3 -m myscript.py
Now truth be told, I haven't had a whole lot of luck with PyVISA-Py. I have been able to get it to list resources, but I just could not seem to make it connect. It kept erroring out on me. I was able to successfully control the scope though via Ethernet using a raw socket connection. Python has a standard sockets library and this library works on the Pi exactly like it does on the PC and is a good option to use for this application.
Who is online
Users browsing this forum: No registered users and 3 guests