Low Cost PCB's Low Cost Components

Author Topic: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)  (Read 3195 times)

0 Members and 1 Guest are viewing this topic.

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2237
  • Country: gb
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.. 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

 

Offline TooOldForThis

  • Regular Contributor
  • *
  • Posts: 52
  • Country: us
  • H: 42.576MHz/Tesla
Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
« Reply #1 on: April 15, 2015, 12:19:34 PM »
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

 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2237
  • Country: gb
Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
« Reply #2 on: April 15, 2015, 09:51:13 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
 

Offline bson

  • Supporter
  • ****
  • Posts: 776
  • Country: us
Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
« Reply #3 on: April 16, 2015, 04:13:47 PM »
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.
<This space intentionally left blank>
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2237
  • Country: gb
Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
« Reply #4 on: April 16, 2015, 08:02:39 PM »
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.
 

Offline bson

  • Supporter
  • ****
  • Posts: 776
  • Country: us
Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
« Reply #5 on: April 17, 2015, 04:04:27 AM »
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
<This space intentionally left blank>
 

Offline cidak

  • Supporter
  • ****
  • Posts: 11
  • Country: it
  • One for all, all for one
Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
« Reply #6 on: June 28, 2015, 07:17:40 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
You had some good answers about this issue?
 

Offline Macbeth

  • Super Contributor
  • ***
  • Posts: 2237
  • Country: gb
Re: Rigol DM3058 Agilent SCPI mode bug (possibly affects DM3068 too)
« Reply #7 on: June 29, 2015, 07:17:50 AM »
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?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf