RIGOL MSO5000 Live Monitor (Hacked FW Compatible)

  • 1.2K Views
  • Last Post 2 days ago
baerndorfer posted this 3 weeks ago

Hi all,

because i was not very satisfied with Web-View from Rigol for my MSO5000 i build my own one.

This tool provides a live view and SCPI-based data extraction from a **Rigol MSO5000** oscilloscope with **hacked firmware** via VNC and VISA (SCPI) interfaces.

The script displays:
- Live screenshots from the oscilloscope (via VNC)
- Channel information including coupling, bandwidth, scale, offset, and probe settings
- Trigger and timebase settings
- Raw waveform statistics (Vpp, Vavg, Vrms) for up to 4 channels
- A scrollable debug log for diagnostics

## Requirements

This script is written in Python 3 and depends on the following libraries:

| Library    | Purpose                            |
|------------|------------------------------------|
| `tkinter`  | GUI interface                      |
| `Pillow`   | Image processing for screenshots   |
| `numpy`    | Numerical processing of waveforms  |
| `pyvisa`   | SCPI communication over TCP/IP     |
| `vncdo`    | VNC client to capture screen image |

### Install dependencies

Make sure you have Python 3 installed, then:

```bash
sudo apt install python3-tk python3-pip
pip3 install pillow numpy pyvisa
sudo apt install vncdo
```

> Note: On Debian/Ubuntu systems, `vncdo` is often available as a package. If not, install it via `pip install vncdo`.

##How to Use

```bash
python3 rigol_vnc_liveview4.py
```

You will be prompted in the terminal to enter the IP address of your RIGOL MSO5000.

Make sure:
- The oscilloscope is on the same network.
- VNC is enabled on the oscilloscope.
- The oscilloscope responds to SCPI commands over TCP/IP.

##Hacked Firmware Notice

This script is optimized to **avoid crashing or hanging** when used with unofficial / hacked firmware:
- Timeouts are reduced
- Some known problematic SCPI queries are skipped or blacklisted after failure

##Screenshot Path

By default, screenshots are saved temporarily at:
```
/tmp/oszi_screenshot.png
```

##Customization

You can adjust these in the script:
- `INTERVALL_BILD`: How often to update the screenshot (seconds)
- `INTERVALL_SCPI`: How often to fetch SCPI data (seconds)
- `WAV_POINTS`: Number of waveform points to request per channel

##License

This project is for **personal use only**. Use at your own risk. Not affiliated with Rigol Technologies.

Attached Files

AlteredUnity posted this 2 weeks ago

This is beautiful, and you work really fast! A few things to enhance research with this tool:

  1. Maybe a bode plot using Math(integ(Vp))/or secondary Integrator vs Ip.

2.1: Inductance, L(avg), ur, u(avg) given there are 2 channels, one Ip, the second connected to secondary coil with rc integrator( so N,R,C, and Vout takes into account) or just integrate the primary coil driven/(N*Ae).

2.2: L = Vpdi/dt, or use slewrate as di/dt

  1. Bmax: Math(integVp(pk))/(N*Ae)

  2. Hmax: Ip*N/le

When calculating L, I believe you need to do segmented integration to capture either slope(up or down). This may be too much but as well as including core losses(for this you will need the volume of the core) I believe. Also two cursors can be set on the scope with over Math1(integ Vp)/Ip at separate times, this can also measure the non-linear region of excitation L = ~ dFluxlinkage/dI from that time period.

Jagau posted this 2 weeks ago

Wow very interesting Baern

Yes, this oscilloscope model has a "power analysis" function integrated into one of its options.
This is one that interests me greatly.

Would have a question,  does it always use the same integrals to calculate real power or VAvg?
Like this one: currently used by the MSO5000 processor.

or you have progranned a new one and could we add and integrate MathLab ?

Don't bother with my question if it seems weird to you.

Jagau

baerndorfer posted this 2 weeks ago

i likt to update you on the progress...

please find a doku for Calculation Model and Scientific Methodology on this page

you should get a deep inside on how things are calculated within script. it also meets scientific standards and more important YoElMiCrO standard šŸ˜Ž (you will find a link on bottom of page where his calculation steps on COP are shown). so all beautiful information went theyr way into script.

in comparision with build in Rigol-Power-Analysis i am pretty close. 

still many things to do...

regards

B

Jagau posted this 2 weeks ago

Yes, you're very close to Rigol's results.

Just an observation.


The little difference, I think, comes from the fact that iin the script it's the instantaneous power p(ti) who is used everything else is the same.


and in Rigol's formula, he integrates it at different amplitudes at different points on the gating area.

xi is the amplitude of the i th point  and n is the number of the points being measured.

We should ask to Yoelmicro for advice on which would be the most appropriate.

You're doing a tremendous job. I'm a beginner at programming and have a bit of trouble keeping up, but I'm very interested. Thank you.


Jagau

 

baerndorfer posted this 2 weeks ago

it took me 2 days to find out, that things can get complicated...
A Journey Through SCPI, Waveforms, and Crashes

Jagau posted this 2 weeks ago

Hello Baerndorfer

I have a document I'd like to share with you, but you may already have it.


It's called the MSO5000 Programming Guide

perhaps it can help you.

Thanks again for the great work.

Jagau

Attached Files

baerndorfer posted this 1 weeks ago

it started as a simple viewer for MSO5000 and went completely off the rails.

thx for doku! very interesting

regards

B

baerndorfer posted this 5 days ago

after conquering new bugs i did heavy refinements to code structure with result, that it works much smoother now. a new feature was implemented to reference the software to our rigol instrument. 
meaning - if the power calculation went off the rails (for whatever reason) you can reference it to a expected Power value. so if rigol math function AxB calculates the power, we can take this value into our script  and publish data with a new correction factor. so we can 'tune' the software to match rigol analysis nearly 100%. 

you can see in screenshot, that Vavg1 is 55W and i have this noted in Expected P value field. now the script calculates with a correction factor 0.872 instead of 1.0 and meets Power Quality from Rigol scope.

regards

B

baerndorfer posted this 2 days ago

This paper describes in great detail what someone can expect from Rigols Power Quality tool. When to use it and when not. It's heavy, but worth reading.

Understanding Accurate Power Measurement on Rigol Oscilloscopes

True power computation is performed via pointwise multiplication of voltage and current waveforms followed by averaging. This method remains accurate for arbitrary waveshapes and is not dependent on sinusoidal assumptions.

 

regards

B

AlteredUnity posted this 2 days ago

Great pointers in that site. I use Math1(AX+B): X = Ch2(Is), A = turns ratio(you can type any number for A[multiplier], here you can use A = 1/R) to get current while still using correct probe scaling. B = 0.

Math2(CH2(Ip) - Math1(Is Ɨ turnsratio) . Same with voltage, different applications you have to correct the phase between certain channels, to differentiate how much magnitizing current is being used, and how much power is being used by load, parasitics, core etc, beyond magnitizing current.

I use a RIGOL RPA246 Power Analysis Phase Difference Correction Jig for DS8000-R-PWR Option, RPA Series to correct phase between needed channels. https://www.techni-tool.com/product/32736-1-RPA246

Close