EEVblog Electronics Community Forum

Products => Test Equipment => Topic started by: coflynn on July 25, 2014, 06:29:09 am

Title: Rigol DP832 Crappy Python GUI
Post by: coflynn on July 25, 2014, 06:29:09 am
I made a (very) crappy Python GUI that interfaces to the DP832. Basically I wanted something to graph current in real-time for monitoring power consumption as switching through different areas of a microcontroller (checking that certain things are switching off mainly). It seemed the graphing application on the DP832 had fixed 3A axis, so I wasn't able to zoom in, although perhaps I'm missing the settings. Anyway this doesn't implement a real class for talking to the DP832 as I only use a single command, so it doesn't use the Python-IVI framework.

The code is posted at https://github.com/colinoflynn/dp832-gui (https://github.com/colinoflynn/dp832-gui). The GUI looks something like this, here I'm plotting power during a Raspberry Pi boot cycle:

(https://raw.githubusercontent.com/colinoflynn/dp832-gui/master/example-pi.png)

There's a video of it running but it's 100% as exciting as you would expect a video showing a simple graphing application to be: https://www.youtube.com/watch?v=Mwu7hfbYQjk (https://www.youtube.com/watch?v=Mwu7hfbYQjk)
Title: Re: Rigol DP832 Crappy Python GUI
Post by: Slappy_g on July 25, 2014, 09:45:51 am
Pretty cool little app!

Actually, I thought the video was a handy walkthrough to see what the app can do.  As a suggestion, next time have some dramatic opera music in the background...  ;)
Title: Re: Rigol DP832 Crappy Python GUI
Post by: mcinque on July 25, 2014, 09:11:41 pm
 :-+
Title: Re: Rigol DP832 Crappy Python GUI
Post by: bwat on July 25, 2014, 09:27:19 pm
Your software is a direct reflection of your thinking. I had a quick look at your code and I don't know enough Python (I know nothing about the language to be honest) to say too much but your code looks like it was structured in accordance to a reasonably well thought out design. I wouldn't call your code "crappy" so you really shouldn't be calling your software "crappy" either.

It sounds like you needed a tool to get a simple one-off job done, and, it looks like that's what happened. That's a success in my book. The fact it's not a monster program doing all manner of useful things is testimony to your understanding of the importance of parsimony in design. The fact it crashes when you do things in the wrong order (as described in your comments in the code), well it's a one off and if you need reliability you can spend some time fixing it.

I think you're being too hard on yourself.
Title: Re: Rigol DP832 Crappy Python GUI
Post by: coflynn on July 26, 2014, 02:54:05 am
Thanks for the kind words! Although I only called it 'crappy' because I don't want people to think it will later get extended to a full-on GUI or anything, it's solely a real-time display app ;-) So maybe 'simple real-time display app' is a better description, but anyway it does what I needed...

Anyway hopefully somebody finds it useful, if you have trouble getting it to run let me know!