EEVblog Electronics Community Forum
Products => Test Equipment => Topic started by: Chendy 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
-
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.
-
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
-
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.
-
amazing thanks
-
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:
-
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