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

0 Members and 2 Guests are viewing this topic.

Offline cpposteve

  • Contributor
  • Posts: 42
  • Country: gb
Re: Rigol DP832 - Firmware list and bugs
« Reply #600 on: March 09, 2020, 10:37:36 pm »
ok, so i have calibrated the 832a via the on-board calibrator, all in all it took me 1.5 hours to just calibrate voltage out and read back voltages on all three channels, ignoring the current as these are well within spec and prob only 1ma out across the board. now all three channels read correctly and im very pleased with how its turned out.


steve
 

Offline garrettm

  • Regular Contributor
  • *
  • Posts: 150
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #601 on: March 10, 2020, 05:56:21 am »
Nice job! Its always pleasant when the output and read back agree with each other.

Well, since I'm too sick to do much else I've been polishing the TelnetCal script. It's looking pretty solid at the moment. I just need to tidy up the current calibration process for both manual entry and automatic entry and I'll upload the source files for anyone who wants to give it a whirl.

I've attached the new and improved output file of the script if anyone wants to see how it would work when running.

The main improvements are skipping calibration for any channel, selectively calibrating volts or current and manual and automatic data entry for current calibration.
 

Offline cpposteve

  • Contributor
  • Posts: 42
  • Country: gb
Re: Rigol DP832 - Firmware list and bugs
« Reply #602 on: March 10, 2020, 08:03:49 am »
Awesome work there. Maybe you could do a little tutorial on how to get telnet talking to the dp832. Would prob benefit guys like me. Hope your feeling better soon, can’t be very nice which having that virus.

Steve
 

Offline ornea

  • Supporter
  • ****
  • Posts: 118
  • Country: au
Re: Rigol DP832 - Firmware list and bugs
« Reply #603 on: March 10, 2020, 09:38:28 am »
Hi Steve,

I have some rough and ready python scripts i have created using telnet to control DP832 for automated testing (puting cheap $1 DC-DC converters thru their paces).

Also some scripts that control the DS-1054Z rigol scope in a similar way to log the output noise from the DC-DC converters as they are loaded up.

Happy to attach if you think they will help.  Warning - my coding kung fu is quite bad, but it may provide some value.  Let me know.

Justin 
 

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1708
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #604 on: March 10, 2020, 09:58:59 am »
Awesome work there. Maybe you could do a little tutorial on how to get telnet talking to the dp832. Would prob benefit guys like me. Hope your feeling better soon, can’t be very nice which having that virus.

Steve
Seconded. This is what I need too.  I can run up Windows 10 Powershell and Telnet to my instruments from there (first you have to enable Telnet in your copy of Win 10, it's disabled by default) and issue 1-off commands but the bit I'm missing is how to do this in a script form. And maybe this is nothing to do with Python?  Maybe we need to install some sort of Python App and run Py Telnet scripts from there?
If at first you don't succeed, get a bigger hammer
 

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1708
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #605 on: March 10, 2020, 11:25:42 am »
So I would like to be able to do automated calibration of my DP832A and it's being suggested that PyCharm is a good choice for a Windows 10 user like me?

The Github page on Rigol DP832 Calibration Script says I need a 6.5 Digit Multimeter supported by python-ivi so I tried to Google if my Keysight 34461A was supported but all that I could find was that Python IVI only supports the following...

Digital Multimeters (dmm):
Agilent 34401A
Agilent 34410A

Maybe the Keysight 34461A is compatible because one of its key feature bullets says "Migrate with confidence from legacy model 34401A" but what does that mean in respect of Python IVI?

Any help or advice is appreciated.
If at first you don't succeed, get a bigger hammer
 

Offline garrettm

  • Regular Contributor
  • *
  • Posts: 150
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #606 on: March 10, 2020, 01:49:59 pm »
Well here it is folks. I think you'll be pleased at how simple it is to use if you give it a try. A full calibration for volts + current on all three channel takes about 30 minutes to complete. That's with a 4 second settling time and pausing to move the banana plugs between channels on the PSU and DMM as needed. And can be speed up if you lower the settling time to 2 or 3 seconds. Though I didn't set that as a parameter that can be configured yet.

I should point out that I haven't tested the manual current calibration. It should work, but if its too clunky let me know and I'll try improving it. Otherwise its pretty streamlined. You have multiple chances to escape before it actually sends any commands to clear the cal constants and lets you pick calibrating one or both parameters per channel.

Let me know what you think, or if there are any bugs. I think I squashed them all for the automated data entry routines, but you never know.

UPDATE: Removed old script. See Reply #704 for new version.
« Last Edit: March 17, 2020, 11:57:54 pm by garrettm »
 

Offline garrettm

  • Regular Contributor
  • *
  • Posts: 150
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #607 on: March 10, 2020, 02:21:11 pm »
Seconded. This is what I need too.  I can run up Windows 10 Powershell and Telnet to my instruments from there (first you have to enable Telnet in your copy of Win 10, it's disabled by default) and issue 1-off commands but the bit I'm missing is how to do this in a script form. And maybe this is nothing to do with Python?  Maybe we need to install some sort of Python App and run Py Telnet scripts from there?

Your 34461A should work if you use the script I uploaded. Java handles the two Telnet connections and the code follows the calibration routine outlined by TooOldForThis. You would only need to find out the port value used by the 34461A and edit that line in the .java file (its not a parameter in the script yet). Then check that the DMM commands will work with your DMM. Fluke/Tektronix say they used the 34401 SCPI commands for the DMM4050, but double check. If not, just modify the string commands in the DMM methods (very simple to do). Then compile the modified .java to .class by running "javac *.java" in PowerShell. Next log into your home router and look at the DHCP table to find the addresses of the PSU and DMM (make sure to enable DHCP on each instrument first), or assign them static addresses that match the rest of the network. Then just run "java TelnetCal" in PowerShell.
 
The following users thanked this post: Gandalf_Sr

Offline garrettm

  • Regular Contributor
  • *
  • Posts: 150
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #608 on: March 11, 2020, 01:25:02 am »
I made a few minor improvements to the readability of the prompts and added some .bat files for quickly compiling and running from the command prompt instead of PowerShell. Everything should be pretty easy to use and I've incuded all the documentation needed for someone to get it up and going. Have fun.

UPDATE: Removed old script. See Reply #704 for new version.
« Last Edit: March 17, 2020, 11:57:36 pm by garrettm »
 
The following users thanked this post: Gandalf_Sr

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1708
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #609 on: March 12, 2020, 10:46:28 am »
Is there a way to backup/save the calibration on the DP832?  I want to try the automated calibration process but I'm worried that I will screw up and make it worse or even unusable.
If at first you don't succeed, get a bigger hammer
 

Offline cpposteve

  • Contributor
  • Posts: 42
  • Country: gb
Re: Rigol DP832 - Firmware list and bugs
« Reply #610 on: March 12, 2020, 10:54:41 am »
If it does then just do it through the the front buttons
 

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1708
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #611 on: March 12, 2020, 03:46:57 pm »
If it does then just do it through the the front buttons
Thanks but that was what I was hoping to avoid.
If at first you don't succeed, get a bigger hammer
 

Offline JDubU

  • Frequent Contributor
  • **
  • Posts: 334
Re: Rigol DP832 - Firmware list and bugs
« Reply #612 on: March 12, 2020, 04:10:36 pm »
Is there a way to backup/save the calibration on the DP832?  I want to try the automated calibration process but I'm worried that I will screw up and make it worse or even unusable.

I don't know of a way to save the calibration but be aware that just starting an automated calibration process for a channel clears out all of the previous settings for that channel.  It does not clear them to any sort of factory calibration -- the parameters are zeroed out so the settings will be really off until the calibration for that channel is completed successfully.
 
The following users thanked this post: Gandalf_Sr

Offline garrettm

  • Regular Contributor
  • *
  • Posts: 150
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #613 on: March 12, 2020, 09:08:51 pm »
As far as TooOldForThis's reverse engineered commands go, there is no SCPI command to read the current cal constants and store them on a PC. It might exist, but Rigol won't release the command set, so we can only work with what we have.

If you use my script, run it till it connects and identifies the instruments. If that step works you are literally half way to calibrating the PSU. The next step is if the DMM string commands are the same as the the DMM4050 as they are for your Keysight unit. There are only 5 methods that really matter, readDMM(), dmmLoclVoltMeas(), dmmRemVoltMeas(), dmmLoclCurrMeas() and dmmRemCurrMeas(). These read and configure the DMM for local and remote operation. These are very simple strings sent via telnet. To test these beforehand, you can simply use putty or windows telnet and send the commands to your DMM. If it responds correctly, then you are good to go and no changes are needed. If your DMM responds differently, then simply change the corresponding string command. Its really that simple. Of course you will need to recompile the modified TelnetCal.java (by running the compile.bat file) and then copy the new .class files over to the Compiled folder and then double click on run.bat to start the script with the modified string commands.

If the Keysight has a 10A current range and uses a digital filter, then I suspect there will be absolutely no issues. But to be safe just send each command via telnet and if you see the DMM report an error, either change that command or comment it out with "//" (but only for non critical things like the digital filter and turning the display on and off).

At any rate, I wouldn't worry about loosing the old cal data. My unit was screwed up beyond belief after the manual calibration bug and It recovered perfectly fine using the SCPI procedure. In fact, it is now in better agreement both read-back and output than previously.
« Last Edit: March 13, 2020, 04:01:01 am by garrettm »
 

Online tv84

  • Super Contributor
  • ***
  • Posts: 1770
  • Country: pt
Re: Rigol DP832 - Firmware list and bugs
« Reply #614 on: March 12, 2020, 09:53:58 pm »
As far as TooOldForThis's reverse engineered commands go, there is no SCPI command to read the current cal constants and store them on a PC. It might exist, but Rigol won't release the command set, so we can only work with what we have.

These are the commands that Rigol's equipments publicize:

https://www.eevblog.com/forum/testgear/lists-of-rigol-scpi-commands/msg2460030/#msg2460030
 

Offline garrettm

  • Regular Contributor
  • *
  • Posts: 150
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #615 on: March 12, 2020, 10:44:15 pm »
@tv84 Excellent work!

From the .txt file for the DP800 we currently know

013E - SET              SET         :CALibration:SET
013F - MEAS            MEAS      :CALibration:MEAS
0140 - STORe          STOR       :CALibration:STORe
0141 - CLEar           CLE         :CALibration:CLEar
0142 - STARt           STAR       :CALibration:STARt
0143 - END             END         :CALibration:END
0144 - SENSE          SENSE     :CALibration:SENSE

When calibrating via SCPI we only use STARt, CLEar, SET, MEAS and END. So I'm curious what SENSE and STORe do. It's possible STORe might allow reading back the stored cal point "measured value" (which is the actual cal constant). But who knows.

Regardless, even if the cal messes up, you can just correct the error and start over. For example: I accidentally forgot to move the banana plug over to the current input while testing my script and recovered just fine by running the script again. So worrying about saving the old cal is pretty mute.
 
The following users thanked this post: Gandalf_Sr

Offline skander36

  • Regular Contributor
  • *
  • Posts: 236
  • Country: ro
Re: Rigol DP832 - Firmware list and bugs
« Reply #616 on: March 13, 2020, 09:48:15 pm »
Hello garrettm ,
I was used your script to calibrate my PSU (832) but with a Siglent DMM (3065X) conviced that SCPI are universally ...
The script is stopped to first message "ch1 DAC-V calibration", the DMM and the PSU are initialized but that is all. No calibration at all .
The problem is that now the PSU cannot be manually calibrated because the source does not increase values at next step (measured value ->input value). Somehow data for calibration is missing .
Any ideas are welcomed.
The PSU can be used but is decalibrated with over 700 mv and 50-100 mA on all channels .
From your script I don't understand how "readDMM" function is done to see what is wrong with my DMM .
 

Offline garrettm

  • Regular Contributor
  • *
  • Posts: 150
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #617 on: March 14, 2020, 03:57:53 am »
I was used your script to calibrate my PSU (832) but with a Siglent DMM (3065X)

Don't worry, my PSU was basically in a similar state and you can recover just fine using the script. But first we need to edit a few lines of code in TelnetCal.java.

If you could upload a copy of the output that would help me understand where something went wrong.

But to start, I assume you already edited TelnetCal.java with the correct port number used to connect to your DMM via Telnet. And also that when you ran the script, you entered the correct IP address for the DMM and PSU.

The problem likely occurred either when trying to read a measurement from the DMM or while configuring it.

First, download the programming manual for your DMM so we can get their SCPI commands. These are simple strings that go something like this conf:volts:dc 100, sets DMM to volts dc 100V range.

Next, assuming you are using Windows, download Putty (a free Telnet client). Then use it to connect to your DMM and send it each of the commands used in readDMM(), dmmLoclVoltMeas(), dmmRemVoltMeas(), dmmLoclCurrMeas() and dmmRemCurrMeas().

For now, let's focus on configuring for DC volts and reading back a measurement.

  public static void dmmRemVoltMeas() throws InterruptedException {
    // configure DMM for voltage measurements
    dmm.send("*cls");
    dmm.send("syst:rem");
    dmm.send("conf:volt:dc");
    dmm.send("volt:dc:nplc 100");
    dmm.send("volt:dc:filt:dig on");
    dmm.send("trig:sour imm");
    dmm.send("trig:del 0");
    dmm.send("trig:coun 1");
    dmm.send("samp:coun 1");
    dmm.send("disp off");
    Thread.sleep(500);
  }

  public static String readDMM() throws InterruptedException {
    dmm.send(":init");
    do { // wait for measurement to complete
      dmm.send("*opc?");
    } while (!dmm.read().equals("1"));
    dmm.send(":fetch?");
    return dmm.read().replaceAll("\\+",""); // remove "+" from values
  }

Looking at the above methods, we would send:

// configure for remote control / volts dc

*cls
syst:rem
conf:volt:dc
volt:dc:nplc 100
volt:dc:filt:dig on
trig:sour imm
trig:del 0
trig:coun 1
samp:coun 1

// READ ROUTINE

// trigger measurement

:init

// is measurement complete? should return 0 if still measuring and 1 when measurement is complete

*opc?

// place measurement in output buffer (Putty reads the output buffer automatically)

:fetch?

// Putty should return
0 or 1
and a voltage measurement if measurement is complete
 
If the DMM reports an error on the display or Putty does not read back a measurement, you will need to change the value of the corresponding string in the above methods to get the script to work using your Siglent DMM.

For the moment, "comment out" the commands

dmm.send("disp off");

and

dmm.send("volt:dc:filt:dig on");

by typing // in front of them. I don't know if your DMM has a digital filter or not and turning the display off is not necessary. The rest of the commands are required to read and configure the DMM for the remote measurement and may need to be tweaked to work with your DMM.

Let me know how your DMM responds to the above commands. Until I know more I can't help you any futher.
« Last Edit: March 14, 2020, 04:24:53 am by garrettm »
 

Offline garrettm

  • Regular Contributor
  • *
  • Posts: 150
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #618 on: March 14, 2020, 04:57:27 am »
@skander36 looking though the Siglent SDM3065X Remote Manual it seems there are some significant differences between it and the Tektronix/Fluke DMM4050.

First, I do not see a digital filter. So we need to comment that out. This is only to help filter measurement noise and is not needed.

Second, they do not use a trigger delay. So we need to comment that out as well.

Third, there doesn't seem to be a way to set the number of power line cycles or NPLC. So we need to comment this out as well. For most HP/Agilent/Keysight and Fluke/Tektronix meters you can set the integration time (0.02, 0.2, 1, 10 and 100). A longer time reduces the influence of external noise on the measurement and increases the number of significant figures reported by the DMM.

Finally, auto ranging is slightly different. Instead of

conf:current:dc 10
current:dc:rang:auto on

used on the DMM4050 to use the 1A to 10A ranges

you would use

conf:current:dc 10
current:dc auto

to hopefully tell it to use the 1A to 10A ranges, but

conf:current:dc auto

may work as well. But you will need to test this since I do not have one of these to play around with.

Overall, its really a quick and easy fix. You just need edit the 5 methods for configuring and reading the DMM for your Siglent meter and you're good to go. And hopefully you learned some programming and SCPI stuff along the way. To be honest, I've learned way more "breaking" things and figuring out where I went wrong than I ever have when they just worked.

« Last Edit: March 14, 2020, 10:07:35 am by garrettm »
 

Offline skander36

  • Regular Contributor
  • *
  • Posts: 236
  • Country: ro
Re: Rigol DP832 - Firmware list and bugs
« Reply #619 on: March 14, 2020, 07:40:13 am »
Hi @garrettm !
Thank you for you time to help me.
When running the script the DMM read the first value (about -140 mV) and stay here .
I also try to eliminate one by one commands to DMM .
For sending SCPI commands I can use also Ultra Sigma SCPI tool .
    dmm.send("*cls");
    dmm.send("syst:rem"); - not work
    dmm.send("conf:volt:dc"); - work
    dmm.send("volt:dc:nplc 100"); - work doing the other commands are supposed to do .(do remote , immediate trig, set NPLC 100)
    //dmm.send("volt:dc:filt:dig on"); - do nothing aparently but may be internally
    //dmm.send("trig:sour imm");
    //dmm.send("trig:del 0");
    //dmm.send("trig:coun 1");
    //dmm.send("samp:coun 1");
    //dmm.send("disp off");
So , even is not in manual "volt:dc:nplc 100" put the DMM in the desired state.
The script can be stopped with control+c so is not blocked.
Command from read DMM also work one by one ...
I don't see the reason why is not working .
« Last Edit: March 14, 2020, 09:24:02 am by skander36 »
 

Offline garrettm

  • Regular Contributor
  • *
  • Posts: 150
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #620 on: March 14, 2020, 10:03:40 am »
If it stalls after the first measurement, then you aren't triggering a new measurement cycle. Assuming *OFC? returns 0 and 1 correctly, then you need to uncomment the commands for triggering:

// replace contents of dmmRemVoltMeas() with

    dmm.send("*cls");
    dmm.send("conf:volt:dc auto");
    dmm.send("samp:coun 1");
    dmm.send("trig:coun 1");
    dmm.send("trig:del 0");
    dmm.send("trig:sour imm");

If this doesn't work then you will need to rewrite readDMM().

I noticed that Siglent do not use a colon ":" in front of :FETCh? and :INIT like the DMM4050 wants.

So change ":fetch?" to "fetch?" and ":init" to "init" in  readDMM().

If that doesn't work, then the Siglent DMM measurement can be done in two ways.

Using :init, *opc? and :fetch?

Or read?


See

page 7,8 for INIT and FETCh?

page 11 for READ?

page 92 for TRIGger Subsystem of note is Source IMMediate and BUS


The problem with using READ? is that we don't know when the measurement is completed. Maybe *OFC? can be used here?

At any rate, you need to be able to remotely configure the DMM using Putty (via Telnet) with individual commands and repeatedly receive measurements when triggered and queried.

(For example, you would type the sequence :init *ofc? :fetch?  or read? every time you want a new measurement.)

Then simply copy this working routine into the script. I can only help you so far, and you need to do your due diligence and read the Siglent documentation and play around with sending the commands. The script is very simple and only automates what you would do yourself. So if you can send one off commands and make that work perfectly, then the script will do the same.
 

Offline skander36

  • Regular Contributor
  • *
  • Posts: 236
  • Country: ro
Re: Rigol DP832 - Firmware list and bugs
« Reply #621 on: March 14, 2020, 10:18:58 am »
Update.
Fetch work with : and without in the same way .
I also try to reduce NPLC to 10 or 1 but DMM doesn't  show measurement anymore . Only 100 show a value on DMM display .
Sometime in putty "fetch?" command return hundreds of values ...
I don't know how this work :return dmm.read().replaceAll("\\+","") , - first value is negative on PSU (now -235091 mV) .I replaced plus sign with minus but no success .
Doesn't seem to be a quick and easy fix .
I use Visual code and PyCharm to edit code . I also try to use others python script from this thread but cannot make them work (older python version). I succed to connect to other SCPI stuff with python but open source with each other version of something is making me confused.
I don't know Java so you are my only hope ...
 

Offline skander36

  • Regular Contributor
  • *
  • Posts: 236
  • Country: ro
Re: Rigol DP832 - Firmware list and bugs
« Reply #622 on: March 14, 2020, 10:32:19 am »
All results inreaDMM are ok as show in pic attached .
I dont know line 355 what do further .

No success with this :

    dmm.send("*cls");
    dmm.send("conf:volt:dc auto");
    dmm.send("samp:coun 1");
    dmm.send("trig:coun 1");
    dmm.send("trig:del 0");
    dmm.send("trig:sour imm");
« Last Edit: March 14, 2020, 10:33:55 am by skander36 »
 

Offline Gandalf_Sr

  • Super Contributor
  • ***
  • Posts: 1708
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #623 on: March 14, 2020, 11:04:45 am »
I will have time to look at this over the next week, how do I find out what port number my 34461A is running on?
If at first you don't succeed, get a bigger hammer
 

Offline garrettm

  • Regular Contributor
  • *
  • Posts: 150
  • Country: us
Re: Rigol DP832 - Firmware list and bugs
« Reply #624 on: March 14, 2020, 11:24:14 am »
Quote
I don't know how this work :return dmm.read().replaceAll("\\+","")

dmm.read().replaceAll("\\+","") simply reads the DMM's output buffer and removes + signs from the string. I did this since my DMM4050 places a + sign in front of all positive measurements. Rigol specifically states that + signs are not needed, and to be safe I remove them. For example +0.999999900E+00 becomes 0.999999900E00.

Quote
first value is negative on PSU (now -235091 mV)

A negative value for the first measurement isn't a problem. Look at the included "Example Output of Cal Routine.txt". On line 66 we have

step 0, cal point: 0.2v, meas val: -5.57821200E-02

which is a negative value. This output file is of the calibration of my DP832A. I added it so people can compare it with values that they see and can understand how the script will work before they use it.

Quote
All results inreaDMM are ok as show in pic attached .

Almost there. You need to send those same commands MULTIPLE times and upload the Putty output so we can rule out readDMM() as the issue.

What I would like to see uploaded is a picture of the Putty output for

// first set DMM to measure dc current, we want to see if the DMM will change from dc current to dc voltage measurement

*cls
conf:volt:dc auto
samp:coun 1
trig:coun 1
trig:del 0
trig:sour imm
:init
:fetch?
:init
:fetch?
:init
:fetch?

if that works as expected, then we need to:

1) manually Telnet into the DP832 and clear the cal constants using

:calibration:start 11111,ch1
:calibration:clear ch1,all.

2) Close Putty to terminate the Telnet connection and then run the script with option 3 voltage calibration for ch1 and option 0 for both ch2 and ch3.

The :calibration:clear ch1,all command will fix any bugs that are present and allow the voltage calibration to work correctly. Then upload the output of the script. If you can manually send commands, then the script can do the same. But if they don't work, then it can't either.
« Last Edit: March 14, 2020, 11:43:15 am by garrettm »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf