I've (mostly) figured out the Datalogging commands. They've (mostly) been integrated into my
control program for Windows.
(I'm not sure if I'll investigate CCDF/histogram mode.)
First, set your data format to REAL (either swapped or NORM)
FORMat REAL; BORDer [NORMal|SWAPPED]
Then, configure datalogging, read it back (to get true window length), and start it up:
CONF:DLOG [CURR|VOLT|DVM],[0.02|1.0|3.0],[DC|ACDC],[window length in secs],1024,IMM
CONF:DLOG?
INIT:NAME DLOG
TRIG:ACQ
*ESR? // Check for errors
Then, reading data by periodically calling:
FETCh:ARRay:DLOG?
It'll return a standard binary-block of 32-bit floats. Note that it will be terminated with a newline, which must be read, or else you'll get synchronization errors. The standard read binblock command doesn't read the newline.
The first three elements is the length of elements in the buffer, duplicated three times. Then each element follows (mean,min,max).
So, for example if the min is -1mA, mean is 0 mA, and max is 1 mA, you could get [2,2,2,0,-1,1,0,-1,1]. When you read the array, it'll return all available data, up to its buffer size of 1024.
In the case of a buffer overflow (you didn't readback data quickly enough), it'll return [-1,-1,-1] and clear the buffer. Sometimes it'll recover, but usually you'll need to abort and restart the measurement.
To stop the measurement:
ABORT
The power supply's clock seems to be within 40 ppm of my laptop's clock. For my software, I'm not sure what the best way to handle inaccuracies in the power supply's timebase. Currently, the software assumes that its timebase is accurate. I was thinking about trying to fudge the resulting times based on the computer's clock, but I'm not sure if that's much better (since my laptop isn't running NTP).
My computer can read back without buffer overfills when the window length is set to about 5ms. The maximum seems to be 1.00001 seconds (any value above this is ignored).
You can only measure on parameter (curr, volt, or dvm) at a time. The official Agilent software gets around this by periodically stopping datalogging, reading the other parameters, and restarting datalogging.