EEVblog Electronics Community Forum

Products => Test Equipment => Topic started by: Macbeth on April 14, 2015, 03:52:28 pm

Title: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
Post by: Macbeth on April 14, 2015, 03:52:28 pm
I've found a serious error in the Agilent command mode of my Rigol DM3058E which pretty much makes the Agilent 34401A emulation next to useless. I have the latest firmware 01.01.00.02.02.00.02.

The Rigol returns a corrupted string in Agilent mode instead of a plain ASCII floating point. In my case the string returned from a READ? or :MEAS:VOLT:DC? query is always prefixed "#9000000016" followed by the expected floating point number.

I spotted this when attempting to test the Rigol DP832 calibration tool developed by EEVblog members LaurentR and bson, thread here. (https://www.eevblog.com/forum/testgear/rigol-dp832-firmware-updates-and-bug-list/270/). The Python PyVISA library throws a type conversion error, and I'm pretty sure any application expecting to use Agilent commands will fail on possibly the most fundamental command of all?

Can anyone with a DM3058(E) or DM3068 connected to their PC confirm this?

For testing I connected the meter to a 10V DC PSU and used the Rigol Ultra Sigma and National Instruments NI MAX applications.

Rigol Ultra Sigma 1.06
SCPI Panel Control

Code: [Select]

 * Connected to: USB0::0x1AB1::0x09C4::DM3R161750000::INSTR
-> *IDN?
<- (Return Count:59)
Rigol Technologies,DM3058E,DM3R161750000,01.01.00.02.02.00

-> *RST
-> *TST?
<- (Return Count:2)
0

-> CMDSET RIGOL
-> :FUNC:VOLT:DC
-> :MEAS AUTO
-> :MEAS:VOLT:DC?
<- (Return Count:13)
1.000208E+01

-> CMDSET AGILENT
-> :MEAS:VOLT:DC?
<- (Return Count:28)
#9000000016  1.00020422e+01

-> READ?
<- (Return Count:28)
#9000000016  1.00020086e+01


You can see in CMDSET RIGOL mode the result of :MEAS:VOLT:DC? is nicely formatted to 6 decimal places 1.000208E+01. My meter is displaying 10.001,2V. The READ? command does not work in Rigol mode.

In CMDSET AGILENT mode the result of :MEAS:VOLT:DC? is garbage followed by a valid float formatted to 8 decimal places (oh yeah, i wish!) . The READ? command produces the same kind of faulty response.

Just for good measure, the NI MAX VISA Test Panel / NI VISA Interactive Control results:

Code: [Select]
1: Write Operation (*IDN?\n)

Return Count: 6 bytes

2: Read Operation
Return Count: 59 bytes
Rigol\sTechnologies,DM3058E,DM3R161750000,01.01.00.02.02.00\n

3: Write Operation (*RST\n)

Return Count: 5 bytes

4: Write Operation (*TST?\n)

Return Count: 6 bytes

5: Read Operation
Return Count: 2 bytes
0\n

6: Write Operation (CMDSET\sRIGOL)

Return Count: 12 bytes

7: Write Operation (:FUNC:VOLT:DC)

Return Count: 13 bytes

8: Write Operation (:MEAS\sAUTO)

Return Count: 10 bytes

9: Write Operation (:MEAS:VOLT:DC?)

Return Count: 14 bytes

10: Read Operation
Return Count: 13 bytes
1.000195E+01\n

11: Write Operation (CMDSET\sAGILENT)

Return Count: 14 bytes

12: Write Operation (:MEAS:VOLT:DC?)

Return Count: 14 bytes

13: Read Operation
Return Count: 28 bytes
#9000000016\s\s1.00019937e+01\n

14: Write Operation (READ?)

Return Count: 5 bytes

15: Read Operation
Return Count: 28 bytes
#9000000016\s\s1.00019415e+01\n

Title: Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
Post by: TooOldForThis on April 15, 2015, 02:19:34 am
I put my DM3068 into Agilent emulation mode and issued a read command using the "UltraSigma" program. 
-> :MEAS:VOLT:DC?
 -2.44986549e-04

The response is almost the same in Rigol mode.
In Agilent mode the value has a leading space and the exponent uses a lower case "e"
In Rigol mode there is no leading space and the exponent uses an upper case "E"

-> *IDN?
Rigol Technologies,DM3068,DM3O152500000,01.01.00.01.08.00

Title: Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
Post by: Macbeth on April 15, 2015, 11:51:13 am
Thanks, looks like a bug in the new firmware recently released for the DM3058. Maybe someone with an earlier version can check?

I have informed Rigol
Title: Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
Post by: bson on April 16, 2015, 06:13:47 am
I'm kind of new to GPIB in general, but from a bit of searching it seems like "#9000000016" is a block length header.
9 is "the length of the length" - 9 digits.  000000016 means there's 16 bytes to follow.  There are in fact 16 bytes (including blanks) in the result...  I think NI-VISA normally handles these envelope type things (it after all needs to know how much to expect in the query reply), and maybe Rigol firmware includes an envelope inside the envelope.
Title: Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
Post by: Macbeth on April 16, 2015, 10:02:39 am
Aha. I figured it was some kind of data formatting string. Just one I'm not familiar with.

It's easy enough to work around by just cutting out the substring (and that is the kludge I used with your Python code), but thats not something I can do with libraries or other applications already built that expect a float.
Title: Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
Post by: bson on April 16, 2015, 06:04:27 pm
It may also be a technically valid response, and maybe some Agilent instrument of the past returned exactly this...  # is also used for hex, octal, binary (#hxxxx..., #oxxxx..., #bxxxx...) so technically I suppose an instrument could also return the reading in octal. :p
Title: Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
Post by: cidak on June 27, 2015, 09:17:40 pm
Thanks, looks like a bug in the new firmware recently released for the DM3058. Maybe someone with an earlier version can check?

I have informed Rigol
You had some good answers about this issue?
Title: Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
Post by: Macbeth on June 28, 2015, 09:17:50 pm
Not yet cidak. I sent a reminder email last week and got told not to expect anything until after the summer. If more owners report the same issue perhaps it will be dealt with?
Title: Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
Post by: justincel on December 26, 2020, 03:52:02 pm
is posibol  hack comverter Rigol DM3058 to DM3068 ???
 >:D
Title: Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
Post by: TurboTom on December 26, 2020, 09:02:26 pm
No way, completely different hardware...unfortunately  ;)