Author Topic: Rigol DP832 - Firmware list and bugs  (Read 311630 times)

0 Members and 2 Guests are viewing this topic.

Online skander36

  • Frequent Contributor
  • **
  • Posts: 723
  • Country: ro
Re: Rigol DP832 - Firmware list and bugs
« Reply #650 on: March 15, 2020, 06:55:41 pm »
Thanks skander,

I was hoping to calibrate my DP832 in 30 minutes, now I'm off down a rabbit hole of learning Java and PowerShell scripting; not how I was planning to spend my Sunday. Plus I have a messed-up DP832

It's clear that the Java has something weird going on with how it handles the responses from my 34461A as I can issue all the commands from a PowerShell Telnet window but the responses I see when running Java have commands that I thought were sent out as the apparent response - the one command that I've commented out (because it didn't work) is the dmm.send("syst:rem"); although the dmm.send("syst:locl"); actually does work - really stupidly confusing. 

Now I'm looking at writing a PowerShell script that would issue the commands but I'll have to write it all for the DP832 too :(

I don't own or have any knowledge of Mathlab, can I run a free version?

Yes it can be downloaded as trial version  ,as I was doing .
I was also try script from JDubU in python but I cannot make python-ivi to work . This is the dark side of open-source everyone has own version of the same thing but they work different .
I have Py-Charm and Visual Studio Code installed and I have used Python scripts to connect succesfully to Rigol oscilloscope . Until now I managed to install all kind of packages in Py-Charm but at those scripts with Python-Visa I give up .
Good luck !
« Last Edit: March 17, 2020, 08:33:20 pm by skander36 »
 

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #651 on: March 15, 2020, 07:02:49 pm »
You're right, it's not obvious!

With calibrate.py opened in PyCharm, click on menu item: File > Settings...
Select Project: calibrate.py  on the left hand side of the Settings window and then select Project Interpreter.
In the drop down list at the top either select your version of Python or add it using the "gear" button on the right.
Now you will see a list of all of the library packages that are already installed in that particular version of Python.  Click the '+' button on the top right to see a list of all other available packages.  Select to install python-ivi and python-vxi11.  You may need to add others if they are needed as dependents of installed packages.  You will find out when you try to run the program and it crashes saying it cannot find something.
I put your files in a folder and opened calibrate.py but, following your instructions above, the PyCharm menu systems can't find any interpreters.  Was I supposed to download one separately to PyCharm or did PyCharm put it somewhere that it needs to be told?
If at first you don't succeed, get a bigger hammer
 

Offline JDubU

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #652 on: March 15, 2020, 07:25:40 pm »
You'll need to install Python 3 separately:

https://www.python.org/downloads/windows/
 

Offline JDubU

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #653 on: March 15, 2020, 08:47:14 pm »
I just tried to test the Python program from a fresh install and discovered a problem with the official python-ivi package on GitHub.  The repository that can be downloaded is actually an older one that does not include the newer 34461A and 34465A instruments additions (despite what the notes on the page say). 
I have reconstructed those files and attached them below as a zip file.

Unzip these files and copy/replace them into the following (default) Python 3 folder:

C:\Users\<USER NAME>\AppData\Local\Programs\Python\Python<VERSION>\Lib\site-packages\ivi\agilent

Where <USER NAME> and <VERSION> are specific to your Windows user name and Python version number
In PyCharm, you will need to clear its file cache in order to see the new files.  Do this by clicking on menu item File > Invalidate Caches / Restart.

It now works for me on this fresh install.


Edit:  The user installed packages that you will need are: 

python-ivi (modified with the attached files)
python-vxi11
numpy
« Last Edit: March 15, 2020, 08:51:44 pm by JDubU »
 
The following users thanked this post: Gandalf_Sr, skander36

Online skander36

  • Frequent Contributor
  • **
  • Posts: 723
  • Country: ro
Re: Rigol DP832 - Firmware list and bugs
« Reply #654 on: March 15, 2020, 09:31:06 pm »
pip3 install python-vxi11
This was missing from my setup ...
The script work with Siglent 3065X but cannot switch from Volt DC to Amp DC , but if you manually switch the callibration is done !
I need only to find why is not switching .

Thank you JDubU !

 

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #655 on: March 15, 2020, 09:35:54 pm »
pip3 install python-vxi11
This was missing from my setup ...
The script work with Siglent 3065X but cannot switch from Volt DC to Amp DC , but if you manually switch the callibration is done !
I need only to find why is not switching .

Thank you JDubU !
Thanks JDubU :D

I got PyCharm installed and added the MS Windows Python 3.8 which I can now see and select as the interpreter in the Setting as per your earlier post but there are no plugins listed and I get the error message below.  I got a warning that I had a permissions issue so I ran PyCharm in admin mode but it still didn't work.

I've had better days than today.
If at first you don't succeed, get a bigger hammer
 

Online skander36

  • Frequent Contributor
  • **
  • Posts: 723
  • Country: ro
Re: Rigol DP832 - Firmware list and bugs
« Reply #656 on: March 15, 2020, 10:08:58 pm »
@Gandalf_Sr
I think that this thing  slowing you working logic probes project .
In PyCharm you must have all needed packages  installed (attached) if that helps you ...


 
The following users thanked this post: Gandalf_Sr

Offline JDubU

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #657 on: March 15, 2020, 10:10:52 pm »
...

I got PyCharm installed and added the MS Windows Python 3.8 which I can now see and select as the interpreter in the Setting as per your earlier post but there are no plugins listed and I get the error message below.  I got a warning that I had a permissions issue so I ran PyCharm in admin mode but it still didn't work.

I've had better days than today.

The default installation location for Python 3.8 in Windows is :

C:\Users\<USER NAME>\AppData\Local\Programs\Python\Python38

I don't know why it was installed in the (protected) Program Files folder.  Also, I have not seen it referred to Python "SDK".

The direct link for the official Python 3.8 download is:
https://www.python.org/ftp/python/3.8.2/python-3.8.2.exe

Might want to try uninstalling your existing version and then install this one instead in its default location.
 
The following users thanked this post: Gandalf_Sr

Offline JDubU

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #658 on: March 15, 2020, 10:19:25 pm »
Followup on the python-ivi version issue:

It looks like the version that has the additional Keysight/Agilent instruments (including the 3446x DMMs) is a later branch off the official version. 

There are two different GitHub pages for them:
https://github.com/python-ivi/python-ivi    (official version)
https://github.com/phsdv/python-ivi          (later version with 34461A and other newer Keysight instruments)

The PyCharm package loader seems to only see the first, official one.
 

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #659 on: March 15, 2020, 10:36:41 pm »
JDubU

Thanks for sticking with me :D  I uninstalled the MS Windows version of Python 3.8 and downloaded the one from https://www.python.org/downloads/release/python-380/ and then I could follow your instructions to add the 3 packages so that's where I'm at now.

For those treading in my footsteps, DON'T INSTALL THE PYTHON VERSION OFFERED BY WINDOWS 10 WHEN YOU TYPE PYTHON INTO THE SEARCH BOX!

Now I need to follow you instructions on modifying the installed package.

So now I see the Pythin code and the interpreter and packages are all there, I modify the IP addresses, select what channels I want to calibrate, and then...

How do I execute this?
If at first you don't succeed, get a bigger hammer
 

Offline JDubU

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #660 on: March 15, 2020, 10:48:07 pm »
...

So now I see the Pythin code and the interpreter and packages are all there, I modify the IP addresses, select what channels I want to calibrate, and then...

How do I execute this?

In PyCharm, select menu item:  Run > Run 'calibrate'
If all is setup and working properly, you will see a Run window at the bottom with interactive messages from the calibration program to make connections, OK each step and show readouts of each calibration data point.
 
The following users thanked this post: Gandalf_Sr

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #661 on: March 15, 2020, 10:48:56 pm »
The ivi\agilent folder wasn't where you said it was, it was here...

C:\Users\ted\AppData\Local\Temp\calibrate.py\venv\Lib\site-packages\ivi\agilent

and I replaced/added the files there with the 3 in your zip file

Hope it's going to work, I'm not going to be able to try this until tomorrow now.
If at first you don't succeed, get a bigger hammer
 

Offline JDubU

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #662 on: March 15, 2020, 11:09:21 pm »
That location is suspicious since it is in a temp folder.  It should be in a subfolder of the Python 3.8 installation folder (...\Python38\Lib\site-packages\ivi\agilent) since it augments the behavior of Python for all programs.
It may be that there is a copy of it in the wrong place because you had to reinstall Python. 
In PyCharm, I suggest that you remove and then re-add those packages (python-ivi, python-vxi11 and numpy) and then go back to the new Python installation folder and do the file modification of python-ivi there.
 

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #663 on: March 15, 2020, 11:43:59 pm »
That location is suspicious since it is in a temp folder.  It should be in a subfolder of the Python 3.8 installation folder (...\Python38\Lib\site-packages\ivi\agilent) since it augments the behavior of Python for all programs.
It may be that there is a copy of it in the wrong place because you had to reinstall Python. 
In PyCharm, I suggest that you remove and then re-add those packages (python-ivi, python-vxi11 and numpy) and then go back to the new Python installation folder and do the file modification of python-ivi there.
I think it's Windoze security keeping me from changing certain things, I've had this before where the Temp/xx/yy folders mimic the Programs/xx/yy folder and, when the code wants the file, it finds it in the temp folder.  If I'm wrong, I'll try what you suggest.

Have a great evening :D
If at first you don't succeed, get a bigger hammer
 

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #664 on: March 16, 2020, 01:21:51 pm »
OK, I'm happy to report that I've managed to do a full calibration on my DP832(A) with my Keysight 34461A using the PyCharm/Python 3.8 setup. 
Here's a few notes if you're trying to follow in my footsteps.

1. You HAVE to download Python from https://www.python.org/downloads/release/python-380/ DO NOT DOWNLOAD THE VERSION THAT MICROSOFT OFFERS FROM THE SEARCH WINDOW

2. Then, install PyCharm (which is just an IDE front end) and it will (eventually) find the interpreter that's installed by step 1*.

3. Add the 3 packages*:
 python-ivi (modified with the files attached to this post)
 python-vxi11
 numpy
The modified files had to go into this directory for me on Windows 10...
C:\Users\ted\AppData\Local\Temp\calibrate.py\venv\Lib\site-packages\ivi\agilent
One file (__init__.py) will replace the one that's already there, the other 2 will be new to the folder

4. When you run the code, all goes well until the first time you are asked to connect to the 10A terminals of the 34461A for the first current test; the issue is that the meter defaults to the 3A terminals (there's a soft button bottom left of the 34461A's screen that toggles between the 3A and 10A terminals).  So my first run was hosed because it was reading the 3A terminals while the current was connected to the 10A terminals (the datasheet for the 34461A says that the max current into the 3A terminal is 3A!).  I fixed it by rerunning and, when it asked to connect to the 10A terminals, I pressed the following buttons on the 34461A... (shift) (shift) (DCI) - soft button for 10A - there are 2 shifts because the first time you press it, it doesn't work but gets the meter out of remote mode - don't worry as the code takes over once you start it again.  The ideal fix for this would be for there to be an extra command in the .py code to put the 34461A into 10A terminal selection.  I was prepared to do this for subsequent channel Amps tests but it seemed like the meter remembered that I wanted to use the 10A terminals.

5. Each time I reran the code, it looked like the errors were still there (huge) but this is likely because each old calibration is wiped before it starts each new run.

The Java code provided by Garrettm DOES NOT WORK WITH THE 34461A! DO NOT USE IT (unless it gets fixed) AS IT WILL HOSE YOU DP832(A)'s CAL.  I appreciate that he was trying to help.

MANY THANKS TO JDubU for his assistance with getting the Python code running  :-+

* See the details in the previous 2 pages from JDubU
If at first you don't succeed, get a bigger hammer
 

Online H.O

  • Frequent Contributor
  • **
  • Posts: 814
  • Country: se
Re: Rigol DP832 - Firmware list and bugs
« Reply #665 on: March 16, 2020, 02:34:34 pm »
For the 34461A the SCPI command for switching to 10A current measurment seems to be
Code: [Select]
CONF:CURR:DC 10And the manual states that selecting the 10A range (as above) automatically switches the input to the 10A terminal. Otherwise, the command to do that seems to be
Code: [Select]
SENS:CURR:DC:TERM 10
Ref: Page 247 and 346 in the manual: https://literature.cdn.keysight.com/litweb/pdf/34460-90901.pdf
 
The following users thanked this post: Gandalf_Sr

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #666 on: March 16, 2020, 03:04:23 pm »
Thanks for the info.  I think I'm going to leave it alone for a while, I've been testing volts and current on all 3 channels and they are all super-accurate now :)

I had my 34461A calibrated a few months back and my DMMcheckplus calibration output of 5.0000 volts displays at 5.00001 Volts on the 34461A.  My DP832A set to 5.000V now displays 4.999 on the DP832A and 4.99996 on the 34461A :D
If at first you don't succeed, get a bigger hammer
 

Online skander36

  • Frequent Contributor
  • **
  • Posts: 723
  • Country: ro
Re: Rigol DP832 - Firmware list and bugs
« Reply #667 on: March 16, 2020, 08:14:19 pm »
@JDubU
Can you tell me where SCPI parameters for current measure are set in script ? (DC:CURRENT:...) . Or where script switch DMM from voltage to current ...
Thank you !
 

Offline JDubU

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #668 on: March 16, 2020, 08:39:41 pm »
@JDubU
Can you tell me where SCPI parameters for current measure are set in script ? (DC:CURRENT:...) . Or where script switch DMM from voltage to current ...
Thank you !

In the file DP832Cal.py:

The calibration parameters for current are at the top of the file:

cal_daci12 = [0.1, 0.25, 0.5, 0.8, 1, 1.25, 1.5, 1.75, 1.9, 2.15, 2.35, 2.5, 2.75,
                  3, 3.2];
cal_adci12 = [0, 0.01, 0.1, 1, 2, 3, 3.2];

These are used at the bottom of the file in the Calibrate() method. 
Do a search for the comment: "# Current".
 
The following users thanked this post: skander36

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #669 on: March 16, 2020, 08:44:44 pm »
Here's a picture of my calibrated DP832(A) sending 5.000V to my 34461A :D
If at first you don't succeed, get a bigger hammer
 
The following users thanked this post: thm_w

Offline garrettm

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #670 on: March 16, 2020, 09:46:27 pm »
Good to hear everyone got their units calibrated using the Python script. I'd like to apologize for the hassle everyone has experienced. The DMM4050 must use a different method to read the output buffer than these other DMMs. I might take my code down since very few people know Java. The only code that really needs to be adjusted are the DMM methods. As everyone has seen, Telnet cal involves much less mucking about but the SCPI commands are completely different between DMMs. If I do keep the script on the forum, I'll probably add a test class for people to get readback working first before running the script.

Again sorry for the trouble everyone has had with the script. It works great with my setup and really shouldn't be hard to figure out, but then again I wrote it. So yeah, my bad.
 
The following users thanked this post: Gandalf_Sr

Offline apelly

  • Supporter
  • ****
  • Posts: 1061
  • Country: nz
  • Probe
Re: Rigol DP832 - Firmware list and bugs
« Reply #671 on: March 16, 2020, 09:58:52 pm »
I'd like to apologize for the hassle everyone has experienced.
You  have the  patience of a saint. I can't believe you bothered to burn up so much of your life helping these people.

I might take my code down since very few people know Java.
Please don't. I might want it in the future.
 

Offline JDubU

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #672 on: March 16, 2020, 10:04:07 pm »
skander36:

If you are asking how to add code to switch an Agilent/Keysight DMM to the 10A input, the following code snippet should work:

# Set Agilent/Keysight DMM to use 10A input terminals
            self._dmm._write("CONF:CURR:DC 10")

Insert it here:
...
# Current
            self._wait_for_enter("Connect the DMM 10A CURRENT inputs to the PSU channel %d" % (channel))
            self._setup_dmm('dc_current')

# Set Agilent/Keysight DMM to use 10A input terminals
            self._dmm._write("CONF:CURR:DC 10")

            self._psu.outputs[channel - 1].enabled = 1
           
            self._calib_single("DAC-I", self.cal_daci, channel, "A", 1)
...
« Last Edit: March 16, 2020, 10:08:15 pm by JDubU »
 
The following users thanked this post: skander36

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1729
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #673 on: March 16, 2020, 10:06:44 pm »
garrettm
Don't feel bad, we know you were sincere in your effort to help.  I can test your modified code if you like as long as it's adapted to:
a. NOT clear the DP832A cal and
b. NOT write the new Cal to the DP832

It should be pretty straightforward to come up with some test code that sets up the DP832 to output a certain voltage and then read the value from the 34461A

Thanks for your help.
« Last Edit: March 16, 2020, 10:17:16 pm by Gandalf_Sr »
If at first you don't succeed, get a bigger hammer
 

Online skander36

  • Frequent Contributor
  • **
  • Posts: 723
  • Country: ro
Re: Rigol DP832 - Firmware list and bugs
« Reply #674 on: March 16, 2020, 10:09:03 pm »
@JDubU
Can you tell me where SCPI parameters for current measure are set in script ? (DC:CURRENT:...) . Or where script switch DMM from voltage to current ...
Thank you !

In the file DP832Cal.py:

The calibration parameters for current are at the top of the file:

cal_daci12 = [0.1, 0.25, 0.5, 0.8, 1, 1.25, 1.5, 1.75, 1.9, 2.15, 2.35, 2.5, 2.75,
                  3, 3.2];
cal_adci12 = [0, 0.01, 0.1, 1, 2, 3, 3.2];

These are used at the bottom of the file in the Calibrate() method. 
Do a search for the comment: "# Current".
I'm not questioning about cal table but where script tell the DMM to switch from DC Voltage to DC Current and send SCPI instructions. I cannot find this in your script .
If I search for "#current " I find  : self._setup_dmm('dc_current') which does not seem to be a SCPI command .
At run  it will read 0 values when calibrate IDAC and IADC .
It is not switching at all on my DMM. If I switch manually on DMM keyboard when script ask to connect to Amps it will read correct values and finish calibration as I said before.
Matlab script do this automatically. Like :

fprintf('Starting Current: connect the DMM 10A CURRENT inputs to PSU channel %d\n', ch);
            input('Press Enter');

            fprintf(myDmm, 'CONF:CURR:DC 10A'); %Sets input to 10A port
            fprintf(myDmm, 'CURR:DC:NPLC %d', myNplc);
            CheckVisaError(myDmm);


Yeap it seem that you answer me while I'm posting ...

Also someone know how calibration values was obtained and from where ? Because on channel 2 lower voltages are negative until 40 mV . Only manual calibration of the DAC V on channel 2 manage to calibrate at a 1.5 mV for 1mV value . Above 100mV precission is equal on 3 decimals .

Thank you .
« Last Edit: March 16, 2020, 10:13:05 pm by skander36 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf