You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to download a screenshot from a Siglent DSO using the SCDP command. This just dumps the binary data for a BMP file. The problem appears to be that it sends all of the data in one shot.
n, status=scope.write('SCDP')
ifstatus==StatusCode.success:
data=scope.read_raw()
open("test.bmp", "w").write(data)
The code just hangs at read_raw().
Adding some diagnostics to TCPIPInstrSession.read(), this is what I see:
wanted 4096 bytes, read 1152057 bytes
want -1131577 more bytes
Upon return from this function, count is negative, the excess data read and returned, but the count is lost in the upper layers. I don't understand the VXI-11 protocol well enough to know if this is a problem with the device not conforming to spec (it seems to work with NI-VISA and their native app), with PyVISA or with PyVISA-py.
I bodged the read() function to buffer the data it receives and only return the requested chunk_size. That seems to work for me (I successfully stored a screenshot), but I don't know if that is a reasonable fix. If it is, I am happy to work up a pull request.
The text was updated successfully, but these errors were encountered:
It appears I can work around the issue by telling read_raw() to read 2MB of data. Somehow I missed that read_raw() accepts an optional length argument.
I am attempting to download a screenshot from a Siglent DSO using the SCDP command. This just dumps the binary data for a BMP file. The problem appears to be that it sends all of the data in one shot.
The code just hangs at read_raw().
Adding some diagnostics to TCPIPInstrSession.read(), this is what I see:
Upon return from this function, count is negative, the excess data read and returned, but the count is lost in the upper layers. I don't understand the VXI-11 protocol well enough to know if this is a problem with the device not conforming to spec (it seems to work with NI-VISA and their native app), with PyVISA or with PyVISA-py.
I bodged the read() function to buffer the data it receives and only return the requested chunk_size. That seems to work for me (I successfully stored a screenshot), but I don't know if that is a reasonable fix. If it is, I am happy to work up a pull request.
The text was updated successfully, but these errors were encountered: