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

0 Members and 1 Guest are viewing this topic.

Offline Chendy

  • Contributor
  • Posts: 37
Rigol DS1054Z: saving / logging values over long duration?
« on: November 23, 2016, 10:41:30 PM »
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

  • Frequent Contributor
  • **
  • Posts: 401
  • Country: ro
Re: Rigol DS1054Z: saving / logging values over long duration?
« Reply #1 on: November 24, 2016, 04:03:16 AM »
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 24, 2016, 06:56:07 AM »
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

  • Frequent Contributor
  • **
  • Posts: 401
  • Country: ro
Re: Rigol DS1054Z: saving / logging values over long duration?
« Reply #3 on: November 24, 2016, 10:11:15 AM »
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 Chendy

  • Contributor
  • Posts: 37
Re: Rigol DS1054Z: saving / logging values over long duration?
« Reply #4 on: December 02, 2016, 03:06:05 AM »
amazing thanks
 

Offline TheoB

  • Regular Contributor
  • *
  • Posts: 56
  • Country: nl
Re: Rigol DS1054Z: saving / logging values over long duration?
« Reply #5 on: December 02, 2016, 08:40:58 AM »
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:
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

http://opalkelly.com/