Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Siglent binary waveforms are unsupported #721

Open
dan-gies opened this issue Nov 4, 2022 · 10 comments · May be fixed by #788
Open

Siglent binary waveforms are unsupported #721

dan-gies opened this issue Nov 4, 2022 · 10 comments · May be fixed by #788

Comments

@dan-gies
Copy link

dan-gies commented Nov 4, 2022

System Info:

Glscopeclient version: 0.1-59ef026
OS: Windows 10
Oscilloscope: Siglent SDS6204A (offline, open from .BIN file)

Description:

I'm unable to open raw waveform binaries using glscopeclient: ERROR: Unknown vendor in file header.

Is this planned to be supported? I think this would be useful, since glscopeclient doesn't support >12.5Mpts live captures, and my scope has 500Mpts of memory depth.

@dan-gies
Copy link
Author

dan-gies commented Nov 4, 2022

Worth noting: Siglent provides a Bin2CSV converter, but it would be nice to import these waveforms natively. However, if this isn't trivial, the converter provides a workaround.

@azonenberg
Copy link
Collaborator

Do you have a link to a spec for the format, and can you share some example files?

Writing an import filter is pretty trivial (the Agilent/Keysight BIN importer is ~200 lines if you don't count the boilerplate for filter creation) but obviously we have to know how the files are structured. If not we might have to reverse engineer it.

@dan-gies
Copy link
Author

dan-gies commented Nov 4, 2022

The spec can be found here: https://siglentna.com/wp-content/uploads/dlm_uploads/2021/09/How-to-Extract-Data-from-the-Binary-File.pdf. The 6000 series isn't listed as supported by the document, but I'm hoping that the format is unchanged.

I'll need to grab a smaller binary - max upload is 25 MB.

@dan-gies
Copy link
Author

dan-gies commented Nov 4, 2022

I split the ch1 capture into 10M volumes using 7zip. If this is unwieldly, let me know. If so, I can get a smaller capture over lunch.

ch1-pt1.zip
ch1-pt2.zip

@hansemro
Copy link
Contributor

hansemro commented Jul 30, 2023

Here is a newer version of the siglent binary spec that specifies formats for SDS2000X HD, SDS5000, and SDS6000: https://www.siglenteu.com/wp-content/uploads/2021/08/How-to-Extract-Data-from-the-Binary-File.pdf

Despite the date in the link, this spec was updated in 2023.

@hansemro
Copy link
Contributor

hansemro commented Aug 1, 2023

I am working on a python script to parse and visualize the waveform: https://gist.github.com/hansemro/4b8733cf5a217bcee7a5796f8eff2726

This script currently supports:

  • V2 waveform format with analog + digital waveform data processing and plotting.
    • supports SDS2000X+ with firmware 1.2.2 to 1.3.9RX
    • supports SDS5000X with firmware between 0.8.6 to 0.9.6
      • untested
    • supports SDS6000A with firmware older than 1.4.1.0 and math disabled
      • tested single channel analog data from @dan-gies
      • a newer V2 format revision includes math waveform support, but that is not yet supported. math waveforms are now supported
    • SDS6000H10/SDS6000H12 should be supported, but are untested

Unfortunately, I have not yet found a method to identify the model from the bin file. For now, the model argument must be specified to get the correct code_per_div. Resolved: can pull code_per_div from bin file.

SDS6000A_1

SDS6000A_2

@hansemro
Copy link
Contributor

hansemro commented Aug 1, 2023

The newer V2 spec (shown on page 29 of E02A: https://web.archive.org/web/20230730072643/https://www.siglenteu.com/wp-content/uploads/2021/08/How-to-Extract-Data-from-the-Binary-File.pdf) describes how to extract code_per_div from what was previously reserved section of data.

With this, I updated the script to no longer require model name!

@hansemro
Copy link
Contributor

hansemro commented Aug 2, 2023

Updated script to support V4 waveform format, which includes support for most scopes running up-to-date firmware.

Fortunately V4 is not much different to V2, so we can greatly simplify the C++ implementation:

  • v2_data[0x4:0x400] should be the same as v4_data[0x8:0x404]. Everything in these regions is enough to process the waveform data.
  • V2 waveform data begins at 0x800, whereas V4 waveform data begins at 0x1000.

Waveform data includes any enabled math channels. Math channel data is inserted between analog and digital channel data.

@hansemro
Copy link
Contributor

hansemro commented Aug 2, 2023

@dan-gies If you are still interested, here is a dev branch with experimental support for importing V2/V4 Siglent BIN waveforms: https://github.com/hansemro/scopehal/tree/siglent-bin-import-dev

Short preview of SiglentBINImportFilter, which currently supports analog channels only:

SiglentBINImportFilterPreview.mp4

@hansemro
Copy link
Contributor

hansemro commented Aug 2, 2023

Updated dev branch with support to import math and digital waveforms.

image

@hansemro hansemro linked a pull request Aug 4, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants