Author Topic: Rigol DS1054Z: saving / logging values over long duration?  (Read 8028 times)

0 Members and 1 Guest are viewing this topic.

Offline ChendyTopic starter

  • Contributor
  • Posts: 48
Rigol DS1054Z: saving / logging values over long duration?
« on: November 23, 2016, 11:41:30 am »
Hi gang,

Just finding my way around this scope...

I want to measure/log 2 voltages over many hours. I assume there is a way to set the sample period and automatically save to the on board memory, and then to USB. How do I do this?

Is there is also a way of using python to stream the data to a PC, and so in theory log forever?

Many thanks

Chendy
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6791
  • Country: ro
Re: Rigol DS1054Z: saving / logging values over long duration?
« Reply #1 on: November 23, 2016, 05:03:16 pm »
I'm not sure if the first method is possible.

For the Python script, it's very easy. You can prepare your own scripts starting from these:
https://github.com/RoGeorge/SCPI_solder_station - as an example of how to continuously read the Vavg from the scope
https://github.com/RoGeorge/DP832_charger_logger - as an example of how to continuously log data in a CSV file.

Offline Mitsch

  • Contributor
  • Posts: 16
Re: Rigol DS1054Z: saving / logging values over long duration?
« Reply #2 on: November 23, 2016, 07:56:07 pm »
Hi Chendy,
my DS1054Z arrived yesterday - I installed and tested this https://github.com/RoGeorge/DS1054Z_screen_capture
works well for me to capture screens. Maybe you could use the capture CSVs let's say every half an our or every 10 minutes?!

Have fun!

Cheers,
Mitsch
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6791
  • Country: ro
Re: Rigol DS1054Z: saving / logging values over long duration?
« Reply #3 on: November 23, 2016, 11:11:15 pm »
Here is a script that logs Vavg for all 4 channels of a Rigol DS1000Z. To use it, you need to install Python 2.7 and to connect the PC and the oscilloscope with a LAN cable. No Rigol, no VISA and no IVI drivers are required.

Download and unzip the Python scripts from

https://github.com/RoGeorge/DS1054Z_data_logger

then open a Command Prompt, go to the unzipped folder "DS1054Z_data_logger" and type "DS1054Z_logger.py 60 192.168.1.3", where 60 is the number of seconds between 2 consecutive records and 192.168.1.3 is the oscilloscope IP.
 
The following users thanked this post: BravoV

Offline ChendyTopic starter

  • Contributor
  • Posts: 48
Re: Rigol DS1054Z: saving / logging values over long duration?
« Reply #4 on: December 01, 2016, 04:06:05 pm »
amazing thanks
 

Offline TheoB

  • Regular Contributor
  • *
  • Posts: 62
  • Country: nl
Re: Rigol DS1054Z: saving / logging values over long duration?
« Reply #5 on: December 01, 2016, 09:40:58 pm »
And this is a one liner to get every second a reading (That's with USB and Linux):

while sleep 1;do echo ':MEAS:ITEM? VAVG, CHAN1' >/dev/usbtmc0; head -1  /dev/usbtmc0;done
2.989799e+00
2.989933e+00
2.989565e+00
2.989666e+00
...

This is an example of the scope measuring a 2.989V DC voltage (on my 3.5 digit MM). The resolution is much better due to averaging of the 1200 samples on the screen. The 8-bit ADC has steps of 40mV (1V/division and 25 points per division). So the resolution after averaging becomes 40mV/1200=0.033mV. Even better  than most multimeters  8), but it's not that stable. I measured 0.03% variation (three sigma) in the readout. So for this reading about a mV. And the accuracy of the scope is of course not intended for accurate voltage measurements even if my reading is within 0.1%, that's not what the scope is rated for.
Still a fun instrument to play with  :popcorn:
 

Offline moby

  • Contributor
  • Posts: 18
  • Country: nz
Re: Rigol DS1054Z: saving / logging values over long duration?
« Reply #6 on: May 23, 2019, 11:27:47 pm »
For the functionally Python illiterate, how would one change the write to log function to write in decimal notation (NN.NN) rather than scientific (which is a bit difficult to read).
Thanx, M
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf