1

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?

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
James Craft
  • 121
  • 5
  • 1
    Looks like the second was what you were looking for. Although I don't know what a `str544` is. – mkrieger1 Dec 04 '21 at 23:32
  • Did you manage to solve the `Cannot convert Variant to String` problem? – user171780 Dec 31 '22 at 12:10
  • No sorry. But there are some github projects that facilitate the communication with LeCroy oscilloscopes out there and are maintained. Don't remember the name though. – James Craft Jan 01 '23 at 14:40

0 Answers0