Author Topic: Rigol DS1054Z CSV Increment value???.......  (Read 6447 times)

0 Members and 1 Guest are viewing this topic.

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
Rigol DS1054Z CSV Increment value???.......
« on: October 18, 2015, 02:57:06 am »
Anyone know what is going on with the "Increment" value in the DS1054Z CSV file header generated from memory?  It doesn't appear to directly represent the sample rate.

The only reference I could find was this other thread which said you need to manually change the increment.  That seems silly.  That is such a simple thing to fix I would think if it was a bug it would have been picked up at this point.

https://www.eevblog.com/forum/projects/rigol-ds1000z-csv-to-ltspice-%28pwl%29-parser-%28testers-welcomed-!%29/

What's the deal?
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
Re: Rigol DS1054Z CSV Increment value???.......
« Reply #1 on: October 18, 2015, 03:38:53 am »
Here are some examples of the CSV header and the associated CSV data summary file:
1:
CH1,Start,Increment,
Volt,-3.00000e-03,5.00000e-06

   DSO Acquire System
Acquire Mode:Normal
Memory Depth:12000pts
Average Num:1024
Sampling Rate:2000000Sa/s

2:
CH1,Start,Increment,
Volt,-1.20000e-01,2.00000e-04

   DSO Acquire System
Acquire Mode:Normal
Memory Depth:12000pts
Average Num:1024
Sampling Rate:50000Sa/s

3:
CH1,CH2,Start,Increment,
Volt,Volt,-5.00000e-01,5.00000e-03

   DSO Acquire System
Acquire Mode:Normal
Memory Depth:6000000pts
Average Num:1024
Sampling Rate:1000000Sa/s
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
Re: Rigol DS1054Z CSV Increment value???.......
« Reply #2 on: October 18, 2015, 04:54:06 am »
Just to throw more data into the mix..
I put a 1khz sine wave into the scope and saved a CSV with 12K points and 200uS horizontal.  That ended up being 5MSa/s on the screen.  I then sucked the data into excel, used the "Increment" from the CSV header to fill in the sample time column, then pulled out one cycle of the sine wave, which should have taken 0.001 seconds for 1khz, but based on the increment value it came up as 0.01 seconds (100hz).
EDIT to say, it's not always just a x10 problem.  It's a different ratio for different sample rates, and it appears to change with number of sample points even at the same sample rate.

The one cycle of 1khz sine wave took 4997 samples.  That lines right up with the 5Msa/s of the actual sample rate.

Here are the header and data summary info.

CH1,Start,Increment,
Volt,-1.20000e-03,2.00000e-06

   DSO Acquire System
Acquire Mode:Normal
Memory Depth:12000pts
Average Num:2
Sampling Rate:5000000Sa/s
« Last Edit: October 18, 2015, 07:26:31 am by Smokey »
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: 00
Re: Rigol DS1054Z CSV Increment value???.......
« Reply #3 on: October 18, 2015, 08:38:58 am »
Why would you want to use csv files? They are way too big & slow.
Just download the data in byte format and you'll be fine.
For example, there's a program called DSRemote that allows you to download display data
or memory data and stores it into a file with the extension ".edf".
Those files can be opened with Scilab, Octave, Matlab, EDFbrowser, etc.
There's no good reason for it but if you really insist to use excel, use the built-in edf to ascii (csv) converter of EDFbrowser.
It's a kind of a de-tour but you'll be sure that your csv files will be correct.

Edit:

Never use csv files if it's not strictly necessary.
Csv files are a kind of "last resort" solution to overcome the barrier of different file formats when a converter is not available.


« Last Edit: October 18, 2015, 08:42:36 am by Karel »
 

Offline Warhawk

  • Frequent Contributor
  • **
  • Posts: 819
  • Country: 00
    • Personal resume
Re: Rigol DS1054Z CSV Increment value???.......
« Reply #4 on: October 18, 2015, 09:00:02 am »
Anyone know what is going on with the "Increment" value in the DS1054Z CSV file header generated from memory?  It doesn't appear to directly represent the sample rate.

The only reference I could find was this other thread which said you need to manually change the increment.  That seems silly.  That is such a simple thing to fix I would think if it was a bug it would have been picked up at this point.

https://www.eevblog.com/forum/projects/rigol-ds1000z-csv-to-ltspice-%28pwl%29-parser-%28testers-welcomed-!%29/

What's the deal?

Hi, this might help you:
https://www.eevblog.com/forum/projects/rigol-ds1000z-csv-to-ltspice-(pwl)-parser-(testers-welcomed-!)/

I think it is a bug.


edit: I did not read the thread carefully...
« Last Edit: October 19, 2015, 06:11:41 am by Warhawk »
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
Re: Rigol DS1054Z CSV Increment value???.......
« Reply #5 on: October 19, 2015, 12:51:51 am »
That link really doesn't like to be copied and pasted.  What a stupid bug, if that's a bug.  So far I've tested a bunch of sample rate/data points/channel count combinations and none of them are right for the increment.  It's not like I'm working with one special case the QC engineers missed.  It's just wrong across the board. 

Except for being less efficient, I'm not sure why you have so much CSV hate.  It's trivial to write an analysis script to interpret CSV formatted data, which it what I'm looking to do.  At least it should be if it had accurate data, which is a fault with Rigol, not CSV. 
 

Offline Warhawk

  • Frequent Contributor
  • **
  • Posts: 819
  • Country: 00
    • Personal resume
Re: Rigol DS1054Z CSV Increment value???.......
« Reply #6 on: October 19, 2015, 06:09:44 am »
That link really doesn't like to be copied and pasted.  What a stupid bug, if that's a bug.  So far I've tested a bunch of sample rate/data points/channel count combinations and none of them are right for the increment.  It's not like I'm working with one special case the QC engineers missed.  It's just wrong across the board. 

Except for being less efficient, I'm not sure why you have so much CSV hate.  It's trivial to write an analysis script to interpret CSV formatted data, which it what I'm looking to do.  At least it should be if it had accurate data, which is a fault with Rigol, not CSV.

I apologize, I did not read your thread carefully and missed that you are refereeing to the same topic. Stupid me :palm:
Anyone else can use the link in my signature. That one should work.

Long story short: It is really bug when you have the source data parameter set to "from memory" and not "from the screen". I reported it to the DS1000z "buglist" thread, however it seems that the community does not care much.
« Last Edit: October 19, 2015, 06:16:17 am by Warhawk »
 

Offline SmokeyTopic starter

  • Super Contributor
  • ***
  • Posts: 2536
  • Country: us
  • Not An Expert
Re: Rigol DS1054Z CSV Increment value???.......
« Reply #7 on: November 30, 2015, 07:37:04 am »
Hey guys,
I've been working on downloading the sample memory over Ethernet using the ds1054z python library and I found some interesting things.
https://github.com/pklaus/ds1054z

The ":WAVeform:PREamble?" command to get waveform paramaters , which includes "xincrement", returns incorrect data.  It's not just xincrement either, "points" is also screwy.  Whatever is feeding the ":WAVeform:PREamble?" command is probably also feeding the CSV increment value. 

The odd thing is that the sample rate command, ":ACQuire:SRATe?" always seems to return the correct value, so the scope is doing something funny with the data internally for the Preamble command. 

Not that it makes a lot of sense, but my first guess was some sort of buffer update access conflict or something.  Dunno.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf