Grabbing Data From A Rigol ‘scope With Python

While a fancy Rigol 1052E oscilloscope is a great tool and a wonderful portable oscilloscope we heartily recommend, sometimes you just need to use the more ‘advanced’ functions of an oscilloscope. Luckily, [cibomahto] figured out how to use a Rigol scope with Python, allowing for easy remote viewing and control of a Rigol 1052E ‘scope on any desktop computer.

[cibomahto]’s Python script grabs the screen and can send commands to the oscilloscope, effectively obviating the need for the slightly-terrible Rigol Ultrascope software. Not only that, controlling the 1052E is possible under OS X and Linux because of the portable Python nature of [cibomahto]’s work.

The Rigol DS1052E has become the de facto standard oscilloscope to grace the workbenches of makers and hackers around the globe. With a small price tag, the ability to double the bandwidth, and an active homebrew development scene, we doubt [cibomahto]’s work of grabbing data over USB will be the last hack we’ll see for this fine machine.

Thanks to [Markus] for sending this one in.

13 thoughts on “Grabbing Data From A Rigol ‘scope With Python

  1. I agree, it’s not “a hack”, but its really nice that he shows how to do it in python.
    I wonder if its possible to capture analog video data (PAL/NTSC) using the oscope and decode it in realtime on a pc.

    1. Sure, reading an API (VISA) and implementing it in your language of choice is always nice to show others how to do it, I just took issue with whoever called it a “hack”. I wrote a GTK+ application in C by reading the API… did I “hack” that as well?

      Well, I think the scope display is an LCD, so there is no PAL/NTSC video signal to decode. What I can’t figure out is how to save a screen shot of the screen. You can do it via the pushbuttons, but I couldn’t implement it with VISA.

    2. I just take issue with the overuse of the term “hack”. Reading an API (VISA) and implementing it in your language of choice is not a “hack”. That’s like saying you read the GTK+ API and wrote an application in C, therefore you did a “hack”. That being said, the post has value, like you said, showing how to do it in Python.

      Well, the display is an LCD, so there is no NTSC/PAL signal to be had. I just wish you could save a screenshot via VISA.

      1. By “capturing a video signal”, I meant connecting the oscope probes to some analog video source, and doing the decoding (hsync, vsync, chroma/luma) in the pc itself.

  2. I don’t think we would be short selling the awesome rigol scopes to say that their Ultrascope software is not slightly terrible but wholly terrible.

    This is great. Installing that ultrascope (bs) took like 3 hours of downloading some huge driver package which turned out to be the wrong one and cause my pc to bsod repeatedly. (I emailed rigol to change their readme instructions it directed me to what I found)

    ty cibomahto

  3. I do not know much about these scopes. But does anybody think there will every be a way to get the raw data – i.e. time vs. voltage datapoints – from them?
    Because that would be really useful for simulating FPGA designs that need to analyze an analog signal. You could save the data in an appropriate text file and then have it read by your test bench.
    If it is not possible to get raw data directly, has anyone ever tried getting datapoints out of the screenshots?

  4. About unlocking the double bandwidth feature: until a few months ago it was reported all hacks would no longer works due to firmware upgrades by Rigol on all newer 1052E scopes. Can anyone confirm that?

Leave a Reply to gzaloprgmCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.