Fetching Data from Owon SDS7102V to PC

Fetching Data from Owon SDS7102V to PC

For one of my recent projects, I needed to automatically fetch oscilloscope samples to PC for automatic analysis. I own the Owon SDS7102V oscilloscope so the first step was to find how to get data from it.

The oscilloscope supports USB and ethernet connectivity (non-V versions probably also RS232, but mine has VGA connector instead).

According to the documentation, the Owon SDS7102 should support SCPI commands, but the one I own didn’t respond to any of them (including the SCPI activation command). It either doesn’t support SCPI at all or the FW on my scope is simply too old.Β  At the time I checked, the link to the firmware update for my oscilloscope on the Owon site was dead :S

Also in the SCPI manual, there are no commands for reading / downloading data and no commands for triggering. There is another command manual which outlines the Owon proprietary commands for fetching data and the return data format. Owon proprietary commands for setting up the oscilloscope don’t seem to be documented, but the source code of the two applications I will mention later is pretty self-explanatory.

Next to the official Owon PC application, there are at least two published applications for controlling Owon oscilloscope. owon-dump can be used to fetch data and parse it. owoncontrol is used to send commands to the oscilloscope and to change the parameters. Both are open source and seem to be more oriented towards the linux society, with no binary files available, also both are using the USB interface.

I decided it was simpler for me to translate the owon-dump to python and change the interface to TCP than to try to port the programs and compile them under windows.

Owon scope needs to have a manually assigned IP to be able to accept TCP connection from PC (you have to configure it on the oscilloscope). I used a MikroTik Hap Lite as a wireless client to make my oscilloscope WiFi enabled πŸ™‚

The “dump” commands (STARTBMP, STARTBIN, STARTMEMDEPTH) are pretty simple and I had them running quickly. The only thing that can go wrong here is setting the delays/timeouts for the data reception (the scope does take its time when you request a data snapshot).

Here is a simple script that worked for me:


The next step was to decode the BIN file and produce some processable data. This involved translating owon-parse to python which took a bit more effort, mainly because of data casting (hint: see struct.unpack).

And now I have some meaningful data I can feed to my processing algorithms πŸ™‚

That’s just how bad an uncompensated probe looks on the square calibration signal πŸ˜‰ If you look carefully you will notice it’s the same signals as in the first image on the scope.

9 Comments on “Fetching Data from Owon SDS7102V to PC

    • You can try compiling the owon-dump sources, which should be easy on linux and not too hard on windows… I will have a dig when I am at home to find the sources translated to python (but note that code might be buggy and it certainly isn’t as clean as dump code presented here)…

  1. Thank you for this article and code. I found that whilst owon_read.zip worked correctly on one python installation it did not on another. The trigger for the problem being a negative y offset. IMHO the cause and solution is:

    def read_32():
    i = read_u32()
    return ctypes.c_long(i).value

    should be

    def read_32():
    i = read_u32()
    return ctypes.c_int32(i).value

    I’m no Python expert but presumably long can have different implementations.

  2. I am trying this code on SDS7102V under Python 3 on Ethernet, apparently it does not communicate (does not respond with anything) even when the syntax is converted. Does SDS7102V support SCPI?
    Is there a way to check if the scope correctly responds (it responds to Ping), for instance, connecting it to terminal application (what is the format? RAW?)

    • You can try connecting using putty to port 3000. You can then send simple textual commands to the scope.

  3. I’ve been able to communicate well with the SDS7102, from linux with a Python program, and using SCPI. All went well till I wanted to get the channel sensitivity (command :CHAN1:SCALe?) No reply from the ‘scope. Undocumented: When in SCPI mode, the scope still accepts STARTMEMDEPTH, STARTBMP and STARTBIN which is great, because switching between proprietary and SCPI mode is tedious.
    Do you have any idea which could be the correct SCPI command to get the channel V/div?

Leave a Reply

Your email address will not be published. Required fields are marked *