PyTektronixScope
PyTektronixScope copied to clipboard
'USBInstrument' object has no attribute 'ask'
Hi, I am trying to just save data from the tektronix DPO2024B oscilloscope, and am using a pretty simple code, but am getting this error in return: 'USBInstrument' object has no attribute 'ask'. Can someone help me understand how to fix this?
Thank you!
import os import pyvisa os.chdir('C:/Users/Lenovo/Desktop/ThorlabsKinesisControl/PyTektronixScope-master')
from PyTektronixScope import TektronixScope
rm = pyvisa.ResourceManager() J = rm.list_resources()
scope = TektronixScope(J[0]) X,Y = scope.read_data_one_channel('CH2', t0 = 0, DeltaT = 1E-6, x_axis_out=True)
I'm having the same issue. Were you able to solve this?
Recent version of visa do not have the ask method. You should replace "ask" by "query" (line 59) and the ask_raw by a "write" and a "read_raw". Note also that line 333-335 could be replace by a query_binary (see https://pyvisa.readthedocs.io/en/1.8/rvalues.html). Unfortunately I don't have the possibility to test those changes right now.