Reading digital wafevorms via VXI11 from the LeCroy wavesurfer 510/MS-500
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 

VBS? 'return=app.LogicAnalyzer.Digital1.Out.Result.XXX' 

where 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)'
VBS? 'return=app.LogicAnalyzer.Digital1.Out.Result.DataArray(1,1,0,0)(0,0)'`  


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:

import vxi11

def getDigitalWaveForm(setup=2, line=0):
    cmd_line = ":".join(["VBS? 't=\"\"",
        "num_samples = app.LogicAnalyzer.Digital%d.Out.Result.Samples" % setup,
         "sample=0",   
         "last_sample=255",
         "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) &lt;&gt; (sample) ) Then " "last_sample=sample:t = t &amp; sample &amp; \"@\" &amp; j &amp; \",\" " "End If",
         "Next",
         "return=t"
        ])    
    print(cmd_line)
    samples = oszi.instr.ask(cmd_line)
    return samples

instr=vxi11.Instrument("169.254.70.213")
instr.timeout = 30 # reading a channel took ~9.1 seconds, but to be safe from timouts for sure
l1 = getDigitalWaveForm(line=1)
print("l1", l1)
&gt;&gt;&gt; VBS 0@0,1@3870004,0@15539981,
l2 = getDigitalWaveForm(line=2)
print("l2", l2)
&gt;&gt;&gt; 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...