I had some e-mails with a LeCroy FAE. The result was, for reading digital waveforms of the MS-500/250 you need to send visual basic commands to query the X-Stream Objects from the scope see docs at section for, or use the
XStream Browser, which comes pre-instaled on the scope to see the object hierarchy of the object on the scope.
To generally access the Digital results use
XXX is the result of the results object. The actual waveform is within
DataArray, which is a 2D-Array with x -> Samples and y -> digital Line, with two further arguments for offsets of samples and sparseing.
#VBS? 'return=app.LogicAnalyzer.Digital1.Out.Result.DataArray(nr_samples, nr_lines, offset_samples, frameOffset, lineOffset)'
The catch is, that you only can transmit strings up to 32768 length, which is a bummer for a million+ samples. So writing a VBS script to go with your scope command is kind of inevitable.
I use python and the vxi11 lib for communication:
def getDigitalWaveForm(setup=2, line=0):
cmd_line = ":".join(["VBS? 't=\"\"",
"num_samples = app.LogicAnalyzer.Digital%d.Out.Result.Samples" % setup,
"res = app.LogicAnalyzer.Digital%d.Out.Result.DataArray(-1,1,0,%d)" % (setup, line),
"for j = 0 To 20000000",
"sample = res(j,0)",
"If ( (last_sample) <> (sample) ) Then " "last_sample=sample:t = t & sample & \"@\" & j & \",\" " "End If",
samples = oszi.instr.ask(cmd_line)
instr.timeout = 30 # reading a channel took ~9.1 seconds, but to be safe from timouts for sure
l1 = getDigitalWaveForm(line=1)
>>> VBS 0@0,1@3870004,0@15539981,
l2 = getDigitalWaveForm(line=2)
>>> VBS 0@0,1@14390413,0@14390416,1@14392593,0@14392596,1@14394773,0@14394776,1@14396953,0@14396956,1@14399133,0@14399136,
Since transmitting all the samples is to time-data consuming I loop over all the samples of a given channel and saved only the logic edges and added them with the sample index to the return string. It's rather dumb and crashes for to fast singnals (remind the 32k limit of the return string), but enough for my purposes ;)
If anybody has some idea for imporvments, let me know. WaveStudio transmits the data somehow binary, and is a little faster, but I didnt find any docs for the API...