Rigol DS1054Z: saving / logging values over long duration? - Page 1
Forum section: electronics / testgear

author: Chendy
author_rank: Contributor
timestamp: November 23, 2016, 11:41:30 am
content: 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 thanksChendy

author: RoGeorge
author_rank: Super Contributor
timestamp: November 23, 2016, 05:03:16 pm
content: 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 scopehttps://github.com/RoGeorge/DP832_charger_logger- as an example of how to continuously log data in a CSV file.

author: Mitsch
author_rank: Contributor
timestamp: November 23, 2016, 07:56:07 pm
content: Hi Chendy,my DS1054Z arrived yesterday - I installed and tested thishttps://github.com/RoGeorge/DS1054Z_screen_captureworks 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

author: RoGeorge
author_rank: Super Contributor
timestamp: November 23, 2016, 11:11:15 pm
content: 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 fromhttps://github.com/RoGeorge/DS1054Z_data_loggerthen 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.

author: Chendy
author_rank: Contributor
timestamp: December 01, 2016, 04:06:05 pm
content: amazing thanks

author: TheoB
author_rank: Regular Contributor
timestamp: December 01, 2016, 09:40:58 pm
content: 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;done2.989799e+002.989933e+002.989565e+002.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, 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

author: moby
author_rank: Contributor
timestamp: May 23, 2019, 11:27:47 pm
content: 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