I am trying to acquire a waveform from a LeCroy Teledyne HDO4024A oscilloscope. I'm using the LeCroyDSO library and I've been able to communicate with the oscilloscope. For example, I could change the vertical scale with:
from lecroydso import ActiveDSO, LeCroyDSO
connection_string = 'VXI11:168.252.89.210'
dso = LeCroyDSO(ActiveDSO(connection_string))
dso.write_vbs('app.Acquisition.C1.VerScale=1')
To retrieve a waveform, I've tried various approaches, all without any luck:
data = dso.get_waveform('C1')
data = np.array(dso.query_vbs('CURV?'))
data = np.array(dso.query_vbs('app.Acquisition.C1.Out.Result.DataArray'))
I've also tried dso.write_vbs
, and removing the np.array()
. But none of these work. The first line doesn't return any variable, the second returns a str544
with value ndarray object of numpy module
and the third returns a str
with value Cannot convert Variant to string
. I don't know what to do from here. How can I retrieve the waveform data?