Products > Test Equipment

Rigol DP832 - Firmware list and bugs

<< < (55/153) > >>

bson:
I ported over LaurentR's script to Python and thought I'd share it here.

I refactored it a bit, so there's an LxiInstr base class, a KeysightTrueVolDmm class for measurements, and a Dp832PowerSupply to talk to the PSU.  I wanted to move the DMM support into a separate file to make it easier to use it for other purposes, such as data logging, or to implement the same interface for other DMM's.  (I kept LaurentR's DM3068 switch to Agilent mode, but not sure if it works.  It would be better to add a native implementation for it.)  calib.py is a generic wrapper pretty much, and all of the calibration guts are in Dp832PowerSupply.  They're DP832 specific anyway, and not easily reusable.

I tested this on OS X 10.10, NI-VISA, PyVISA, LAN devices, 34465A DMM.  Python2.7 is required.
But it should work fine with GPIB, USB also.  (<= famous last words!)

The code is somewhat short on comments...  Anyway, it's a first stab at creating a generic Python library for VISA instrument support.

Stupid Beard:

--- Quote from: bson on April 12, 2015, 09:52:57 pm ---The code is somewhat short on comments...  Anyway, it's a first stab at creating a generic Python library for VISA instrument support.

--- End quote ---

Why don't you just use https://github.com/python-ivi/python-ivi which already supports the DP832, as well as a bunch of other DMMs, scopes, PSUs, etc?

bson:
Oh cool, had no idea such a thing existed!

Edit: it doesn't seem to know how to calibrate or do much of anything else device specific...

Macbeth:

--- Quote from: bson on April 12, 2015, 09:52:57 pm ---I ported over LaurentR's script to Python and thought I'd share it here.
--- End quote ---
Thanks for this. I have a Rigol DM3058E but never got around to using LaurentR's code because I don't have Matlab. I don't believe any Rigol owner has tested it yet?

Anyway, I'm using Windows 7 and have never used Python before, but what the hell - lets see what this snakey thing is. It wasn't as simple as just download python and run, there are a few dependencies as well:

Python 2.77
Microsoft Visual C++ Compiler for Python 2.7
pip 6.11

then use pip to download and install

PyVISA 1.6.3
NumPy 1.9.2 (go and make a cup of tea while waiting for this one to compile/install!)

Results in next post...

LaurentR:

--- Quote from: bson on April 12, 2015, 09:52:57 pm ---I ported over LaurentR's script to Python and thought I'd share it here.

I refactored it a bit, so there's an LxiInstr base class, a KeysightTrueVolDmm class for measurements, and a Dp832PowerSupply to talk to the PSU.  I wanted to move the DMM support into a separate file to make it easier to use it for other purposes, such as data logging, or to implement the same interface for other DMM's.  (I kept LaurentR's DM3068 switch to Agilent mode, but not sure if it works.  It would be better to add a native implementation for it.)  calib.py is a generic wrapper pretty much, and all of the calibration guts are in Dp832PowerSupply.  They're DP832 specific anyway, and not easily reusable.

I tested this on OS X 10.10, NI-VISA, PyVISA, LAN devices, 34465A DMM.  Python2.7 is required.
But it should work fine with GPIB, USB also.  (<= famous last words!)

The code is somewhat short on comments...  Anyway, it's a first stab at creating a generic Python library for VISA instrument support.

--- End quote ---

Got it to work on Win64 and it's great, thanks. I used Matlab out of convenience (and easy drawing/debug), but was always wanting to give pyvisa a try (I am not a Python expert though). Thanks for doing the work.

Unfortunately, as pointed out:

--- Quote from: Macbeth on April 13, 2015, 01:13:49 am ---Anyway, I'm using Windows 7 and have never used Python before, but what the hell - lets see what this snakey thing is. It wasn't as simple as just download python and run, there are a few dependencies as well:
...

--- End quote ---
The Windows install is not straightforward for us GUI people, but it works  :)

The only issue I had with your code was that early on, you check for the presence of ":" in the device Visa addresses, but Visa supports aliases , which typically don't have ":" in the name. For instance, my 2 devices are aliased (rather imaginatively) "DP832" and "34461A".

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod