ngscopeclient / scopehal

Test and measurement hardware abstraction library and protocol decodes. This is the library only. Most users should use scopehal-apps.
BSD 3-Clause "New" or "Revised" License
207 stars 94 forks source link

Siglent: Support MSO channels #580

Open azonenberg opened 2 years ago

hansemro commented 1 year ago

For SDS2000X+/SDS2000X HD/SDS5000X/SDS6000, we can process digital waveforms with the following steps:

  1. Get waveform parameters (shared with all digital channels):
    • Get digital sample rate with :DIGITAL:SRATE?.
      • Sampling interval can be obtained from WAVEDESC/:WAVEFORM:PREAMBLE?
    • Get total number of digital samples with :DIGITAL:POINTS?.
      • Cannot be obtained from WAVEDESC/:WAVEFORM:PREAMBLE?.
        • WAVEDESC lists the number of analog samples...
  2. Select the channel source with :WAVEFORM:SOURCE D<N>
  3. Obtain sample size and data with :WAVEFORM:DATA?
    • 8x 1-bit samples per byte with lsb bit ordering.
    • sample size from the header divided by 8 is equal to the expected data size in bytes
    • (optional) check if the data sample size matches the total sample size obtained from :DIGITAL:POINTS?.
  4. Process samples in each byte of data...

Python script to fetch and plot analog/math/digital waveforms on SDS2000X+: https://gist.github.com/hansemro/311107a5bf4a5e5733b729a947f09b0b#file-sds2000xp_read_waveforms-py

scopehal prototype branch for SDS2000X+: https://github.com/hansemro/scopehal/commits/siglent-mso-dev