i think i have somewhat concluded my adventures into exploring SCPI via RS232.
i have included a block diagram of what i did to the python program, python examples on pyserial to SCPI seems to be not very popular, even in EEVblog/keithley-forums there is not many examples (see attached text file python example on a working sample, version 2 simplified with error tolerance)
ser.write(':SENS:VOLT:DC:NPLC 10\r')
ser.write(':ABOR\r')
ser.write(':SYST:AZER:STAT ON\r')
ser.write(':INIT\r')
(the above lines can be added for K2015 to state AUTOzero = ON and NPLC = 10
i think as a python noob if i could do it, somebody else could use it and form their own version for what ever they are trying to log/measure. the 29999 sample ( (@1.5Hz) bean counter plot (using opencalc), NPLC 10, autozero on, filter off, 100mV. nearly a bell curve.) is using a further evolved version, including error avoidance and delay self adjustment (as said in the block diagram). so it could log on and on and on as long as RAM permits. there is a small quirk to xlwt though, it seems once saving starts, there seem to be a memory leak which will cause the reading latency to increase until it affects the cycle to cycle FETCH timing and crash, while it is possible to override the errors, the timing consistency will be affected. so extremely long logs will be interesting and possibly challenging (days? weeks?)
tools used for the coding
1) python 2.7
2) pyserial 2.7
3) xlwt (for writing to xls file format)
what is not needed in this ? --> pyVISA? keithley drivers? keithley utilities? ALL NO
you need to however read the manual in detail (even though it is not in detail enough to properly explain the SCPI syntaxes in some areas). i know sounds like something is wrong with not needing what lotsa people are already using (VISA? GPIB?), but that is esp true if you dont wanna spend that much $$$ on GPIB interface. each pc is upwards of USD$100, as oppose to USD10-30 RS232 (amazon has the 4 port FTDI for about USD$47). i am not sure how many ports can a PC hold? COM29? COM99?
in this exploration adventure, i have also discovered (or felt that...) that the various RS232 interfaces may have been somewhat crippled to a low speed. while GPIB are high speed specified, RS232 are not little mice, does implementing high speed RS232 require hefty license fee?
(in my over excitement to ask questions about SCPI/GPIB/RS232/logging, i have also posted in
https://www.eevblog.com/forum/projects/is-this-a-real-ns-lm399-%28from-polida-ebay%29/https://www.eevblog.com/forum/testgear/keithley-2015-measurements-with-computer-display/msg772298/#msg772298if you are beginner in trying SCPI, there is sadly not much to read, but hopefully this will help resolve some RS232 questions
and this is the thread that started it all
https://www.eevblog.com/forum/testgear/dmm-adc-noise-comparison-testing-project/)
exit()
(i should be able to try more samples when i have cleaned up the DMM and compare the noise bell curve, NOW that would be interesting if changing fresh components will decrease overall internal noise, and it is my curiosity in the first place when i saw the DMM noise thread, and possibly, what else could you possibly improve to reduce noise even further?)