Author Topic: Siglent: SigScopeLab & Binary File  (Read 3440 times)

0 Members and 1 Guest are viewing this topic.

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Siglent: SigScopeLab & Binary File
« on: February 11, 2024, 08:25:00 pm »
So like to process some sample data form SDS2000X plus:

[1] Save binary data at the SDS

Record Length      Analog: 20'000'000
Sample Rate      2'000'000'000
Vertical Scale       CH2:+1.000000E-003
Vertical Offset       CH2:+0.000000E+000
Horizontal Scale   1.00E-03
Second         Volt

csv file using the converter tool given on SDS in ZIP file for MS PC.

Record Length   Analog:20000000
Sample Rate   2000000000
Vertical Scale    CH2:+1.000000E-003
Vertical Offset    CH2:+0.000000E+000
Horizontal Scale   1.00E-03
Second   Volt
-5.00E-03   1.08E-04
-5.00E-03   1.08E-04
-5.00E-03   8.33E-05
-5.00E-03   9.17E-05
-5.00E-03   1.08E-04
-5.00E-03   1.08E-04
.......

form Excel getting only maximal 1'048'571 samples to saved to txt as selected columns !!!

So did Memory load the Bin into SigScopeLab: Complains maximal of 2M samples  :palm:

[2] Deal now as expecting better SigScopelab over network:

Issue 1: Samples gets burst signals as never seen on SDS

Issue 2: FFT Math channel without any scaling, so hard to know what range do we have selected

see picture..

Hp


« Last Edit: February 14, 2024, 09:29:17 am by hpw »
 

Offline slugrustle

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: us
Re: Siglent: SigScopeLab how it goes
« Reply #1 on: February 11, 2024, 08:36:59 pm »
I'm having a bit of trouble parsing what you wrote, and I can't help you with the items under heading [2].  But maybe I can help with this one:

form Excel getting only maximal 1'048'571 samples to saved to txt as selected columns !!!

Excel has a maximum limit of 1'048'576 rows = 2^20 rows.  See https://support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3.

To quote an intern at work after dealing with some other issues in Excel, "for as important and widely used as Excel is, it's not a very good tool."
 
The following users thanked this post: hpw

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Re: Siglent: SigScopeLab how it goes
« Reply #2 on: February 12, 2024, 08:10:49 pm »
I'm having a bit of trouble parsing what you wrote, and I can't help you with the items under heading [2].  But maybe I can help with this one:

form Excel getting only maximal 1'048'571 samples to saved to txt as selected columns !!!

Excel has a maximum limit of 1'048'576 rows = 2^20 rows.  See https://support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3.

To quote an intern at work after dealing with some other issues in Excel, "for as important and widely used as Excel is, it's not a very good tool."

I was a bit confused about the none working SW, as channel 2 burst and dynamically missing lines. Also heavy reduced 2M sample limitation to load into memory.
The FFT without any X/Y scaling.

In addition on the SDS2000X, the math as FFT binary export failed with an error message, so I started to use this Free SW...

Interesting would be an API for 3thrd party to retrieve any data in any SW.

Hp


 

Offline slugrustle

  • Frequent Contributor
  • **
  • Posts: 278
  • Country: us
Re: Siglent: SigScopeLab how it goes
« Reply #3 on: February 13, 2024, 12:53:38 am »
If you're handy with SCPI, you might be able to get the data you want that way.  If you're already going to the trouble of writing such a program, manipulating the data with a scale factor, etc.  could be done as part of the extraction.

Unfortunately, in the latest programming manual for the SDS2000X plus, extracting FFT data is only "documented" through an example under the heading Read Waveform Data of FFT Example.
 
The following users thanked this post: hpw

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Re: Siglent: SigScopeLab how it goes
« Reply #4 on: February 13, 2024, 08:25:22 am »
If you're handy with SCPI, you might be able to get the data you want that way.  If you're already going to the trouble of writing such a program, manipulating the data with a scale factor, etc.  could be done as part of the extraction.

Unfortunately, in the latest programming manual for the SDS2000X plus, extracting FFT data is only "documented" through an example under the heading Read Waveform Data of FFT Example.

Well, thank you, reading the BIN file (as more accurate) is the better/simpler direction but as on https://www.eevblog.com/forum/testgear/siglent-sds2000x-plus-bugs-missing-features-feature-requests/msg5330459/#msg5330459 a pitta again. Form me no surprise from this company  :--.

Hp
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6663
  • Country: hr
Re: Siglent: SigScopeLab how it goes
« Reply #5 on: February 13, 2024, 09:23:57 am »
If you're handy with SCPI, you might be able to get the data you want that way.  If you're already going to the trouble of writing such a program, manipulating the data with a scale factor, etc.  could be done as part of the extraction.

Unfortunately, in the latest programming manual for the SDS2000X plus, extracting FFT data is only "documented" through an example under the heading Read Waveform Data of FFT Example.

Well, thank you, reading the BIN file (as more accurate) is the better/simpler direction but as on https://www.eevblog.com/forum/testgear/siglent-sds2000x-plus-bugs-missing-features-feature-requests/msg5330459/#msg5330459 a pitta again. Form me no surprise from this company  :--.

Hp

As it is not a surprise that you come up with offensive statements without proper research...
We would be better able to help you if could explain better what you want.

Did you notice this post was mostly your monologue so far. People are hesitant to help you because it is really hard to understand what are you really saying, and then you tend to be, well, not nice, to those that try to.

As it was said to you, you need to get data from the scope as raw captures and do all the processing (FFT and all) on your PC.

No scope will do half of processing just the way you want it.
Only way to have complete control is to do it all in code.


In that post you are referring to Programing manual "As an E02A documentation update request for the "How to Extract Data from Binary File...""
I went to Siglent's site and newest Programing manual that you can download from there is version EN11E

Linked:
https://siglentna.com/download/41216/?tmstv=1707815266

Please take a look and see if that can help you...
 

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Re: Siglent: SigScopeLab how it goes
« Reply #6 on: February 13, 2024, 10:44:04 am »
If you're handy with SCPI, you might be able to get the data you want that way.  If you're already going to the trouble of writing such a program, manipulating the data with a scale factor, etc.  could be done as part of the extraction.

Unfortunately, in the latest programming manual for the SDS2000X plus, extracting FFT data is only "documented" through an example under the heading Read Waveform Data of FFT Example.

Well, thank you, reading the BIN file (as more accurate) is the better/simpler direction but as on https://www.eevblog.com/forum/testgear/siglent-sds2000x-plus-bugs-missing-features-feature-requests/msg5330459/#msg5330459 a pitta again. Form me no surprise from this company  :--.

Hp

As it is not a surprise that you come up with offensive statements without proper research...
We would be better able to help you if could explain better what you want.

Did you notice this post was mostly your monologue so far. People are hesitant to help you because it is really hard to understand what are you really saying, and then you tend to be, well, not nice, to those that try to.

As it was said to you, you need to get data from the scope as raw captures and do all the processing (FFT and all) on your PC.

No scope will do half of processing just the way you want it.
Only way to have complete control is to do it all in code.


In that post you are referring to Programing manual "As an E02A documentation update request for the "How to Extract Data from Binary File...""
I went to Siglent's site and newest Programing manual that you can download from there is version EN11E

Linked:
https://siglentna.com/download/41216/?tmstv=1707815266

Please take a look and see if that can help you...


Well, well... today is the 13.

You completely missed, how the binary format locks like and this is NOT given on your referenced pdf at all, only my reference as the documentation to use, as it is with false calculation algo and not complete as already V4 used for SDS200x Plus!!!! .... just use any hex editor and than :palm:

As I like to read the DATA from the saved bin file as stored on the SDS2000X plus... no more and nothing less.  :palm:

Cheers

Hp


Hp
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6663
  • Country: hr
Re: Siglent: SigScopeLab how it goes
« Reply #7 on: February 13, 2024, 12:44:31 pm »
If you're handy with SCPI, you might be able to get the data you want that way.  If you're already going to the trouble of writing such a program, manipulating the data with a scale factor, etc.  could be done as part of the extraction.

Unfortunately, in the latest programming manual for the SDS2000X plus, extracting FFT data is only "documented" through an example under the heading Read Waveform Data of FFT Example.

Well, thank you, reading the BIN file (as more accurate) is the better/simpler direction but as on https://www.eevblog.com/forum/testgear/siglent-sds2000x-plus-bugs-missing-features-feature-requests/msg5330459/#msg5330459 a pitta again. Form me no surprise from this company  :--.

Hp

As it is not a surprise that you come up with offensive statements without proper research...
We would be better able to help you if could explain better what you want.

Did you notice this post was mostly your monologue so far. People are hesitant to help you because it is really hard to understand what are you really saying, and then you tend to be, well, not nice, to those that try to.

As it was said to you, you need to get data from the scope as raw captures and do all the processing (FFT and all) on your PC.

No scope will do half of processing just the way you want it.
Only way to have complete control is to do it all in code.


In that post you are referring to Programing manual "As an E02A documentation update request for the "How to Extract Data from Binary File...""
I went to Siglent's site and newest Programing manual that you can download from there is version EN11E

Linked:
https://siglentna.com/download/41216/?tmstv=1707815266

Please take a look and see if that can help you...


Well, well... today is the 13.

You completely missed, how the binary format locks like and this is NOT given on your referenced pdf at all, only my reference as the documentation to use, as it is with false calculation algo and not complete as already V4 used for SDS200x Plus!!!! .... just use any hex editor and than :palm:

As I like to read the DATA from the saved bin file as stored on the SDS2000X plus... no more and nothing less.  :palm:

Cheers

Hp


Hp

As I said, it is hard to really understand what are you saying. Also, as I said, instead of all the facepalms, please try to explain better.
One thing that helps in that is that you should explain things one by one, without changing the topic all the time.

It wasn't clear what data you are referring to: BIN or CSV saved to file from scope, or data pulled from the network via SCPI.

If I get you right now, you are saving data to BIN file and trying to open that.
As documentation you use document "How-to-Extract-Data-from-the-Binary-File.pdf" with version stamp E02A
That document describes data format up to v3 of data.
Your scope seems to save data with higher version, v4, which seems different.

Is that correct?

Make note, I'm trying to help you. I don't have that scope myself so cannot try it myself.

When complaining to manufacturer, faceplams don't help.
But if we can report actual problem, they will respond and fix it.
That way the have clear problem to solve and have no excuse they didn't know.



 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26907
  • Country: nl
    • NCT Developments
Re: Siglent: SigScopeLab how it goes
« Reply #8 on: February 13, 2024, 04:52:26 pm »
If you want to use data from an instrument either save as text (CSV) or read 'live' data using SCPI. Anything else is a crapshoot. And never ever use manufacturer provided software as this is typically written by an intern.
« Last Edit: February 13, 2024, 05:11:01 pm by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Re: Siglent: SigScopeLab how it goes
« Reply #9 on: February 13, 2024, 05:36:46 pm »
If you want to use data from an instrument either save as text (CSV) or read 'live' data using SCPI. Anything else is a crapshoot. And never ever use manufacturer provided software as this is typically written by an intern.

As it goes on.

Using the CSV data, the given sample value are truncated / shorted. The values are IMHO not precise enough as missing mantissa.

So the best is reading the sample values from the BIN file. Also, less effort required to read it into the App.

IMHO, even with SCPI, the data is written into the BIN file & requires exact knowledge about the internal data structure
AND how to calculate the Sample Values as binary offset on the BIN file.

So the data is the following as real sample values and corresponding BIN as words values:

- ch_volt_div_val is = 0.001 (1mV/div)
- ch_vert_offset is  = 0   (Volts)

[1] 1.08E-04 has BIN value as 33600
[2] 1.08E-04 has BIN value as 33600
[3]  8.33E-05 has BIN value as 33408
[4]  9.17E-05.....

Now as mentioned Formula on page 46 in the Siglent Binary manual: 

voltage = (data-128) * ch_volt_div_val /1000/code_per_div + ch_vert_offset

Is false while:

a) is for 8 bit offset binary, V4 has 16 bit offset binary!!

b) code_per_div is as 25 for the old SDS2000X plus data structure

What is needed, an updated Formula for SDS2000X Plus, as calculations using BIN Version 4:

voltage = (data-32767) * ch_volt_div_val /1000/code_per_div + ch_vert_offset

it looks as the value of code_per_div should be changed and this needs Siglent.

Hp


 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26907
  • Country: nl
    • NCT Developments
Re: Siglent: SigScopeLab how it goes
« Reply #10 on: February 13, 2024, 05:41:10 pm »
If you want to use data from an instrument either save as text (CSV) or read 'live' data using SCPI. Anything else is a crapshoot. And never ever use manufacturer provided software as this is typically written by an intern.

As it goes on.

Using the CSV data, the given sample value are truncated / shorted. The values are IMHO not precise enough as missing mantissa.

So the best is reading the sample values from the BIN file. Also, less effort required to read it into the App.

IMHO, even with SCPI, the data is written into the BIN file & requires exact knowledge about the internal data structure
AND how to calculate the Sample Values as binary offset on the BIN file.
No, with SCPI you receive the data in the format you want with precision you want (typically you can select how the result is formatted unless Siglent messed this up). Your software script can then decide how to write the data into a file.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Performa01

  • Super Contributor
  • ***
  • Posts: 1645
  • Country: at
Re: Siglent: SigScopeLab how it goes
« Reply #11 on: February 13, 2024, 06:23:59 pm »
Here is some data about current Siglent DSOs (codes/LSB in visible screen area, codes/LSB per division):

SDS800X HD:       3840 LSB, 480/div;
SDS1000X-E:        200 LSB, 25/div;
SDS2000X Plus:    240 LSB, 30/div; (960 LSB, 120/div in 10 bit mode);
SDS2000X HD:      3840 LSB, 480/div;
SDS6000 H12 Pro: 3400 LSB, 425/div;

EDIT: added the obvious: in 10 bit mode, you have to multiply the numbers by 4!
« Last Edit: February 14, 2024, 09:35:16 am by Performa01 »
 
The following users thanked this post: 2N3055

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Re: Siglent: SigScopeLab how it goes
« Reply #12 on: February 13, 2024, 08:34:04 pm »
Here is some data about current Siglent DSOs (codes/LSB in visible screen area, codes/LSB per division):

SDS800X HD:       3840 LSB, 480/div;
SDS1000X-E:        200 LSB, 25/div;
SDS2000X Plus:    240 LSB, 30/div;
SDS2000X HD:      3840 LSB, 480/div;
SDS6000 H12 Pro: 3400 LSB, 425/div;

So voltage = (data-32767) * ch_volt_div_val /1000/code_per_div + ch_vert_offset

using [1] 1.08E-04 Volts has BIN value as 33600

voltage = (33600-32767) * ch_volt_div_val /1000 / 30 + 0 is 2.77766 E-5 but should result in 1.08E-4 Volts

So as for Binary V4, any difference for the Binary Word offset has to be considered as no any longer 8Bit.

Or I am wrong, 

As for [1].... [3] if the code_per_div value is 100/13 the Sample Values gets as the original  :-+


 

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Re: Siglent: SigScopeLab how it goes
« Reply #13 on: February 14, 2024, 09:28:33 am »
Here is some data about current Siglent DSOs (codes/LSB in visible screen area, codes/LSB per division):

SDS800X HD:       3840 LSB, 480/div;
SDS1000X-E:        200 LSB, 25/div;
SDS2000X Plus:    240 LSB, 30/div;
SDS2000X HD:      3840 LSB, 480/div;
SDS6000 H12 Pro: 3400 LSB, 425/div;

Did now checked the same thing with an applied Signal as:

3.92E-03mV from CSV and Bin as 62848 Peak >> getting with may 100/13 (7.6923) more or less the same 3.9105mV signal back.

This means the value of 30 is NOK! 30 is may valid for the older V3 binary version.

So Siglent engineers please ..

Hp
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 28382
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Siglent: SigScopeLab how it goes
« Reply #14 on: February 14, 2024, 06:34:35 pm »

So Siglent engineers please ..

Are on CNY holidays for another week.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 

Offline points2

  • Contributor
  • Posts: 37
  • Country: fr
Re: Siglent: SigScopeLab & Binary File
« Reply #15 on: February 18, 2024, 04:59:04 pm »
Hi,
Just a quick mail to support you hpw  :-+
I had the same feeling about this SW when I tried it  |O (although it was a more basic try than yours)

Thanks to you for creating this topic.
It's a nice & promising topic !

"Nice" : because the display of this SW is "nice" on a 1440p screen (far nicier than the web interface or thru VNC viewer that enable only a copy/paste of the scope with the resolution of the scope... + big lag...)

"Promising" : because in the last months I realized I tend to use more & more the remote display than the scope itself (by playing with nobs & buttons). I find that viewing the measurement from my desk (front of PC screen) is more friendly (to me ;D ).

"Promising" because this SW doesn't work... but if one day it works, it's gonna be a great add-on to the device itself !
Please find here the link to my post vs my 1st experience with this SW a few days ago => https://www.eevblog.com/forum/testgear/siglent-technical-support-join-in-eevblog/msg5336969/#msg5336969
(I didn't see this dedicated topic when I posted)

According to Siglent web site => https://www.siglenteu.com/service-and-support/firmware-software/pc-software/#sigscopelab
it is the 1st released version... so we can expect some fixes in the (near?) "future"  :-+
but I don't understand why they released such a buggy stuff... and why version "V0.4.9.2" ? I can't figure out how the version v0.1.0.1 was more buggy than this one  ;D
 

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Re: Siglent: SigScopeLab & Binary File
« Reply #16 on: February 20, 2024, 09:14:12 am »

As it goes on...

IMHO the SW is more like on Alpha stage or as Banana ware  :-DD

Important to know:

- If you use any LAN or WIFI, you will see any RF on your spectrum, may not on 12Bit, but if you use large FFT and high bit's as from an Audio ADC.
  This means, to switch off any LAN / WIFI is a must do...

- The sampled data as given in the BIN file and may also over the remote SW is time scale dependent. So about 5ms you get the full 100M samples. If
  faster time scales used as 5us you may get 20k samples only. You will see below the time icon about the used sample size.

- The Save/Export of sample data using multiple channels, gets multiple files!!!!! not as promised in the BIN specifications as each channel data added after the other

- the BIN file comes with the exact scale factors as for each SDS any different and bits dependent as for SDS2000X plus (8/10 bits)

 

Offline antian

  • Contributor
  • Posts: 15
  • Country: us
Re: Siglent: SigScopeLab & Binary File
« Reply #17 on: February 27, 2024, 09:05:21 pm »
Hi sorry to revive this but I am having trouble trying to extract data from the BIN file of my SDS2000X plus. I found a few codes that work with my SDS1000X-E exported and I am hoping to use this Matlab code (https://www.mathworks.com/matlabcentral/fileexchange/99529-import-siglent-oscilloscope-binary-file) but it looks like it isn't reading the bin files from the SDS2000X plus (latest firmware). Unfortunately I am not very familiar with decoding binary but when I fread I see the file is read as an array of 5004096 values. The first value in the 0x00 address is 4 which I believe should correspond to the version but the file on how to extract data from binary says there is supposed to be a 0, 1, or 2. Does this suggest that the binary format has changed? I believe the document I am looking at from Siglent says it was last updated in 2019. Since it looks like the data starts after the 4096th row, I think the data starts on 0x1000 which is different that what the manual says of 0x800.
« Last Edit: February 27, 2024, 09:10:14 pm by antian »
 

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Re: Siglent: SigScopeLab & Binary File
« Reply #18 on: February 28, 2024, 10:32:05 am »
Hi sorry to revive this but I am having trouble trying to extract data from the BIN file of my SDS2000X plus. I found a few codes that work with my SDS1000X-E exported and I am hoping to use this Matlab code (https://www.mathworks.com/matlabcentral/fileexchange/99529-import-siglent-oscilloscope-binary-file) but it looks like it isn't reading the bin files from the SDS2000X plus (latest firmware). Unfortunately I am not very familiar with decoding binary but when I fread I see the file is read as an array of 5004096 values. The first value in the 0x00 address is 4 which I believe should correspond to the version but the file on how to extract data from binary says there is supposed to be a 0, 1, or 2. Does this suggest that the binary format has changed? I believe the document I am looking at from Siglent says it was last updated in 2019. Since it looks like the data starts after the 4096th row, I think the data starts on 0x1000 which is different that what the manual says of 0x800.

With the new FW you have already the V4 format.  8)

The specification about V4 format is given in earlier post. In other words, your reading BIN SW should take care of any versions and act according.  :-DD

Hp


 
The following users thanked this post: antian

Offline antian

  • Contributor
  • Posts: 15
  • Country: us
Re: Siglent: SigScopeLab & Binary File
« Reply #19 on: February 29, 2024, 09:19:13 am »
Hi sorry to revive this but I am having trouble trying to extract data from the BIN file of my SDS2000X plus. I found a few codes that work with my SDS1000X-E exported and I am hoping to use this Matlab code (https://www.mathworks.com/matlabcentral/fileexchange/99529-import-siglent-oscilloscope-binary-file) but it looks like it isn't reading the bin files from the SDS2000X plus (latest firmware). Unfortunately I am not very familiar with decoding binary but when I fread I see the file is read as an array of 5004096 values. The first value in the 0x00 address is 4 which I believe should correspond to the version but the file on how to extract data from binary says there is supposed to be a 0, 1, or 2. Does this suggest that the binary format has changed? I believe the document I am looking at from Siglent says it was last updated in 2019. Since it looks like the data starts after the 4096th row, I think the data starts on 0x1000 which is different that what the manual says of 0x800.

With the new FW you have already the V4 format.  8)

The specification about V4 format is given in earlier post. In other words, your reading BIN SW should take care of any versions and act according.  :-DD

Hp

Hi, thanks for the information in the other posts, I really appreciate it. I found a decent Matlab code (https://www.mathworks.com/matlabcentral/fileexchange/99529-import-siglent-oscilloscope-binary-file) that reads data from my 1000X BIN well but unfortunately it doesn't do the 2000X either and I'm planning to just modify this. I'm not sure if it's because I am a total binary noob or I am missing something or if it's matlab but I changed the waveform data location offset to x1000, the code_per_div = 30, and the data subtraction by 32767, but it looks like something is still off and it might be missing some sections.

For example, there is a value (the number 16) in 0x05 so is there supposed to be something in 0x04 - 0x7? I'm looking at a file with only Ch1 on and it looks like my ch1_on indication starts on 0x08 instead of 0x04 per the outdated manual. When I tried to add a space / skip for 0x04 - 0x7, the script still does not work so I have a feeling value might be important.

Another example is that ch1_volt_div_val is supposed to start on 0x14 but that position is empty. The next value I see is at 0x30.

I appreciate the help!
 

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Re: Siglent: SigScopeLab & Binary File
« Reply #20 on: February 29, 2024, 10:04:51 am »
Hi sorry to revive this but I am having trouble trying to extract data from the BIN file of my SDS2000X plus. I found a few codes that work with my SDS1000X-E exported and I am hoping to use this Matlab code (https://www.mathworks.com/matlabcentral/fileexchange/99529-import-siglent-oscilloscope-binary-file) but it looks like it isn't reading the bin files from the SDS2000X plus (latest firmware). Unfortunately I am not very familiar with decoding binary but when I fread I see the file is read as an array of 5004096 values. The first value in the 0x00 address is 4 which I believe should correspond to the version but the file on how to extract data from binary says there is supposed to be a 0, 1, or 2. Does this suggest that the binary format has changed? I believe the document I am looking at from Siglent says it was last updated in 2019. Since it looks like the data starts after the 4096th row, I think the data starts on 0x1000 which is different that what the manual says of 0x800.

With the new FW you have already the V4 format.  8)

The specification about V4 format is given in earlier post. In other words, your reading BIN SW should take care of any versions and act according.  :-DD

Hp

Hi, thanks for the information in the other posts, I really appreciate it. I found a decent Matlab code (https://www.mathworks.com/matlabcentral/fileexchange/99529-import-siglent-oscilloscope-binary-file) that reads data from my 1000X BIN well but unfortunately it doesn't do the 2000X either and I'm planning to just modify this. I'm not sure if it's because I am a total binary noob or I am missing something or if it's matlab but I changed the waveform data location offset to x1000, the code_per_div = 30, and the data subtraction by 32767, but it looks like something is still off and it might be missing some sections.

For example, there is a value (the number 16) in 0x05 so is there supposed to be something in 0x04 - 0x7? I'm looking at a file with only Ch1 on and it looks like my ch1_on indication starts on 0x08 instead of 0x04 per the outdated manual. When I tried to add a space / skip for 0x04 - 0x7, the script still does not work so I have a feeling value might be important.

Another example is that ch1_volt_div_val is supposed to start on 0x14 but that position is empty. The next value I see is at 0x30.

I appreciate the help!

As long you not understand the V4 specification fully, any pitta to see  :palm:

May simple provide a SHORT sampled BIN using your SDS2K + and also from the SDS1000X-E .
Also tell if any BIN provided from the SDS2k + whether used 8 bit or 10 bit acq.

Hp



 

Offline antian

  • Contributor
  • Posts: 15
  • Country: us
Re: Siglent: SigScopeLab & Binary File
« Reply #21 on: February 29, 2024, 08:18:49 pm »
Hi sorry to revive this but I am having trouble trying to extract data from the BIN file of my SDS2000X plus. I found a few codes that work with my SDS1000X-E exported and I am hoping to use this Matlab code (https://www.mathworks.com/matlabcentral/fileexchange/99529-import-siglent-oscilloscope-binary-file) but it looks like it isn't reading the bin files from the SDS2000X plus (latest firmware). Unfortunately I am not very familiar with decoding binary but when I fread I see the file is read as an array of 5004096 values. The first value in the 0x00 address is 4 which I believe should correspond to the version but the file on how to extract data from binary says there is supposed to be a 0, 1, or 2. Does this suggest that the binary format has changed? I believe the document I am looking at from Siglent says it was last updated in 2019. Since it looks like the data starts after the 4096th row, I think the data starts on 0x1000 which is different that what the manual says of 0x800.

With the new FW you have already the V4 format.  8)

The specification about V4 format is given in earlier post. In other words, your reading BIN SW should take care of any versions and act according.  :-DD

Hp

Hi, thanks for the information in the other posts, I really appreciate it. I found a decent Matlab code (https://www.mathworks.com/matlabcentral/fileexchange/99529-import-siglent-oscilloscope-binary-file) that reads data from my 1000X BIN well but unfortunately it doesn't do the 2000X either and I'm planning to just modify this. I'm not sure if it's because I am a total binary noob or I am missing something or if it's matlab but I changed the waveform data location offset to x1000, the code_per_div = 30, and the data subtraction by 32767, but it looks like something is still off and it might be missing some sections.

For example, there is a value (the number 16) in 0x05 so is there supposed to be something in 0x04 - 0x7? I'm looking at a file with only Ch1 on and it looks like my ch1_on indication starts on 0x08 instead of 0x04 per the outdated manual. When I tried to add a space / skip for 0x04 - 0x7, the script still does not work so I have a feeling value might be important.

Another example is that ch1_volt_div_val is supposed to start on 0x14 but that position is empty. The next value I see is at 0x30.

I appreciate the help!

As long you not understand the V4 specification fully, any pitta to see  :palm:

May simple provide a SHORT sampled BIN using your SDS2K + and also from the SDS1000X-E .
Also tell if any BIN provided from the SDS2k + whether used 8 bit or 10 bit acq.

Hp

Cool so I found the document on V4 for the 2000X HD (updated 2023-1-17) but I don't think it matches up exactly. I've attached the PDF I am looking at. I see it has a data_offset_byte_ at 0x04-0x07 which makes sense perfectly, the ch1_on matches whats expected [1 0 0 0] for only Ch1_on, but reading the ch1_volt_div_val is not coming out. The document says it's supposed to start on 0x18-0x3f (so basically up until 0x40 when ch2_volt_div_starts?) and the first 64-fit float points should be the value, the next 32-bit is the magnitude and the next 32-bit is the unit. This is the same format as V3 when it comes to reading the ch1_volt_div_val I believe. This is outlined in Table 2 in the document but my matlab fread shows this first 40 lines because ch2_volt_div_val is supposed to start on 0x40:

Code: [Select]
INDEX VAL
0 4
1 0
2 0
3 0
4 0
5 16
6 0
7 0
8 1
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16 0
17 0
18 0
19 0
20 0
21 0
22 0
23 0
24 0
25 0
26 0
27 0
28 0
29 0
30 240
31 63
32 8
33 0
34 0
35 0
36 0
37 0
38 0
39 0

There is no value in the 64-bit float point starting at 0x18. The matlab script should be reading that first 64-bit properly so it looks like there's no data? Do you have an idea what might be going on?

Any help is greatly appreciated
 

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Re: Siglent: SigScopeLab & Binary File
« Reply #22 on: February 29, 2024, 08:50:16 pm »
Hi sorry to revive this but I am having trouble trying to extract data from the BIN file of my SDS2000X plus. I found a few codes that work with my SDS1000X-E exported and I am hoping to use this Matlab code (https://www.mathworks.com/matlabcentral/fileexchange/99529-import-siglent-oscilloscope-binary-file) but it looks like it isn't reading the bin files from the SDS2000X plus (latest firmware). Unfortunately I am not very familiar with decoding binary but when I fread I see the file is read as an array of 5004096 values. The first value in the 0x00 address is 4 which I believe should correspond to the version but the file on how to extract data from binary says there is supposed to be a 0, 1, or 2. Does this suggest that the binary format has changed? I believe the document I am looking at from Siglent says it was last updated in 2019. Since it looks like the data starts after the 4096th row, I think the data starts on 0x1000 which is different that what the manual says of 0x800.

With the new FW you have already the V4 format.  8)

The specification about V4 format is given in earlier post. In other words, your reading BIN SW should take care of any versions and act according.  :-DD

Hp

Hi, thanks for the information in the other posts, I really appreciate it. I found a decent Matlab code (https://www.mathworks.com/matlabcentral/fileexchange/99529-import-siglent-oscilloscope-binary-file) that reads data from my 1000X BIN well but unfortunately it doesn't do the 2000X either and I'm planning to just modify this. I'm not sure if it's because I am a total binary noob or I am missing something or if it's matlab but I changed the waveform data location offset to x1000, the code_per_div = 30, and the data subtraction by 32767, but it looks like something is still off and it might be missing some sections.

For example, there is a value (the number 16) in 0x05 so is there supposed to be something in 0x04 - 0x7? I'm looking at a file with only Ch1 on and it looks like my ch1_on indication starts on 0x08 instead of 0x04 per the outdated manual. When I tried to add a space / skip for 0x04 - 0x7, the script still does not work so I have a feeling value might be important.

Another example is that ch1_volt_div_val is supposed to start on 0x14 but that position is empty. The next value I see is at 0x30.

I appreciate the help!

As long you not understand the V4 specification fully, any pitta to see  :palm:

May simple provide a SHORT sampled BIN using your SDS2K + and also from the SDS1000X-E .
Also tell if any BIN provided from the SDS2k + whether used 8 bit or 10 bit acq.

Hp

Cool so I found the document on V4 for the 2000X HD (updated 2023-1-17) but I don't think it matches up exactly. I've attached the PDF I am looking at. I see it has a data_offset_byte_ at 0x04-0x07 which makes sense perfectly, the ch1_on matches whats expected [1 0 0 0] for only Ch1_on, but reading the ch1_volt_div_val is not coming out. The document says it's supposed to start on 0x18-0x3f (so basically up until 0x40 when ch2_volt_div_starts?) and the first 64-fit float points should be the value, the next 32-bit is the magnitude and the next 32-bit is the unit. This is the same format as V3 when it comes to reading the ch1_volt_div_val I believe. This is outlined in Table 2 in the document but my matlab fread shows this first 40 lines because ch2_volt_div_val is supposed to start on 0x40:

Code: [Select]
INDEX VAL
0 4
1 0
2 0
3 0
4 0
5 16
6 0
7 0
8 1
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16 0
17 0
18 0
19 0
20 0
21 0
22 0
23 0
24 0
25 0
26 0
27 0
28 0
29 0
30 240
31 63
32 8
33 0
34 0
35 0
36 0
37 0
38 0
39 0

There is no value in the 64-bit float point starting at 0x18. The matlab script should be reading that first 64-bit properly so it looks like there's no data? Do you have an idea what might be going on?

Any help is greatly appreciated

again and again beef needed :palm:

Provide a SHORT sampled BIN using your SDS2K + and also from the SDS1000X-E .
Also tell if any BIN provided from the SDS2k + whether used 8 bit or 10 bit acq.


As attached as ZIP format.

Cheers

Hp
 

Offline antian

  • Contributor
  • Posts: 15
  • Country: us
Re: Siglent: SigScopeLab & Binary File
« Reply #23 on: March 01, 2024, 01:27:21 am »
Hi sorry to revive this but I am having trouble trying to extract data from the BIN file of my SDS2000X plus. I found a few codes that work with my SDS1000X-E exported and I am hoping to use this Matlab code (https://www.mathworks.com/matlabcentral/fileexchange/99529-import-siglent-oscilloscope-binary-file) but it looks like it isn't reading the bin files from the SDS2000X plus (latest firmware). Unfortunately I am not very familiar with decoding binary but when I fread I see the file is read as an array of 5004096 values. The first value in the 0x00 address is 4 which I believe should correspond to the version but the file on how to extract data from binary says there is supposed to be a 0, 1, or 2. Does this suggest that the binary format has changed? I believe the document I am looking at from Siglent says it was last updated in 2019. Since it looks like the data starts after the 4096th row, I think the data starts on 0x1000 which is different that what the manual says of 0x800.

With the new FW you have already the V4 format.  8)

The specification about V4 format is given in earlier post. In other words, your reading BIN SW should take care of any versions and act according.  :-DD

Hp

Hi, thanks for the information in the other posts, I really appreciate it. I found a decent Matlab code (https://www.mathworks.com/matlabcentral/fileexchange/99529-import-siglent-oscilloscope-binary-file) that reads data from my 1000X BIN well but unfortunately it doesn't do the 2000X either and I'm planning to just modify this. I'm not sure if it's because I am a total binary noob or I am missing something or if it's matlab but I changed the waveform data location offset to x1000, the code_per_div = 30, and the data subtraction by 32767, but it looks like something is still off and it might be missing some sections.

For example, there is a value (the number 16) in 0x05 so is there supposed to be something in 0x04 - 0x7? I'm looking at a file with only Ch1 on and it looks like my ch1_on indication starts on 0x08 instead of 0x04 per the outdated manual. When I tried to add a space / skip for 0x04 - 0x7, the script still does not work so I have a feeling value might be important.

Another example is that ch1_volt_div_val is supposed to start on 0x14 but that position is empty. The next value I see is at 0x30.

I appreciate the help!

As long you not understand the V4 specification fully, any pitta to see  :palm:

May simple provide a SHORT sampled BIN using your SDS2K + and also from the SDS1000X-E .
Also tell if any BIN provided from the SDS2k + whether used 8 bit or 10 bit acq.

Hp

Cool so I found the document on V4 for the 2000X HD (updated 2023-1-17) but I don't think it matches up exactly. I've attached the PDF I am looking at. I see it has a data_offset_byte_ at 0x04-0x07 which makes sense perfectly, the ch1_on matches whats expected [1 0 0 0] for only Ch1_on, but reading the ch1_volt_div_val is not coming out. The document says it's supposed to start on 0x18-0x3f (so basically up until 0x40 when ch2_volt_div_starts?) and the first 64-fit float points should be the value, the next 32-bit is the magnitude and the next 32-bit is the unit. This is the same format as V3 when it comes to reading the ch1_volt_div_val I believe. This is outlined in Table 2 in the document but my matlab fread shows this first 40 lines because ch2_volt_div_val is supposed to start on 0x40:

Code: [Select]
INDEX VAL
0 4
1 0
2 0
3 0
4 0
5 16
6 0
7 0
8 1
9 0
10 0
11 0
12 0
13 0
14 0
15 0
16 0
17 0
18 0
19 0
20 0
21 0
22 0
23 0
24 0
25 0
26 0
27 0
28 0
29 0
30 240
31 63
32 8
33 0
34 0
35 0
36 0
37 0
38 0
39 0

There is no value in the 64-bit float point starting at 0x18. The matlab script should be reading that first 64-bit properly so it looks like there's no data? Do you have an idea what might be going on?

Any help is greatly appreciated

again and again beef needed :palm:

Provide a SHORT sampled BIN using your SDS2K + and also from the SDS1000X-E .
Also tell if any BIN provided from the SDS2k + whether used 8 bit or 10 bit acq.


As attached as ZIP format.

Cheers

Hp

Hi,

I have attached two files: one of ~15V p2p sine wave from the sds1000x and one ~20V p2p square wave from the sds2K+. The SDS2K+ is taken with 8 bits. I did more digging and realized I was reading hex wrong and I think the error is reading the ch1_volt_div_val. The matlab code reads the sds1000x totally fine but it doesn't does the sds2K+ with V4. At 0x18-0x3f when it is supposed to be reading a volt_div_val scaling of ~4V for channel 1, it reads 1V for channel 1 and completely wrong numbers for the other channels. I believe at 0x18-0x3f the first 8 bits are for the 64-bit float point and this reads [0 0 0 0 0 0 240 63]. I don't actually know how to convert this to a decimal but that doesn't look correct?

Thanks a lot for the help
 

Offline Calvin

  • Regular Contributor
  • *
  • Posts: 166
  • Country: de
    • Calvin´s audio page
Re: Siglent: SigScopeLab & Binary File
« Reply #24 on: March 01, 2024, 05:53:06 am »
Hi,

had installed the SigScopeLab a couple of days ago on a WIN10 computer.
Unfortunately the software crashes always and already when trying to connect to the scope.
What a piece of s*****.  :--
Also the GUI doesn´t look intuitive at all.
Fortunately the Webserver functions well .... so there seems hardly any need for a another piece of crappy software ... or?

regards
Calvin
..... it builds character!
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6663
  • Country: hr
Re: Siglent: SigScopeLab & Binary File
« Reply #25 on: March 01, 2024, 09:11:11 am »
Hi,

had installed the SigScopeLab a couple of days ago on a WIN10 computer.
Unfortunately the software crashes always and already when trying to connect to the scope.
What a piece of s*****.  :--
Also the GUI doesn´t look intuitive at all.
Fortunately the Webserver functions well .... so there seems hardly any need for a another piece of crappy software ... or?

regards
Calvin

I don't know about stability on your PC. You should contact Siglent support for that.

As for GUI, that is not a MS Office application..
It is not a PC based mathematical package that happens to be able to load file from scope.
That is scope OFFLINE application. This is literally software that runs on scope but compiled for Windows.
Many manufacturers have the same.
It is very powerful thing. You can save a signal in the office, put it on laptop and analyse (math decode, whatever) later...

I didn't try it in depth yet, but I also had some intermittent connection problems.
Or shall I say, more like timeouts on longer timebases..
No crashes though.
Will test more one of these days when I have some time... Not very soon unfortunately.
 
The following users thanked this post: Performa01

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Re: Siglent: SigScopeLab & Binary File
« Reply #26 on: March 01, 2024, 10:25:24 am »
Hi,

I see in your ZIP

[1] 20kV_1kHz_C2_sample.bin as format V4!!!

[2] sds2000xplus_square.bin as format V4!!!

>> As I have attached two files: one of ~15V p2p sine wave from the sds1000x and one ~20V p2p square wave from the sds2K+.
>> The SDS2K+ is taken with 8 bits. I did more digging and realized I was reading hex wrong and I think the error is reading the
>> ch1_volt_div_val.
>> The matlab code reads the sds1000x totally fine but it doesn't does the sds2K+ with V4. At 0x18-0x3f when it is supposed to
>> be reading a volt_div_val scaling of ~4V for channel 1, it reads 1V for channel 1 and completely wrong numbers for the other
>> channels. I believe at 0x18-0x3f the first 8 bits are for the 64-bit float point and this reads [0 0 0 0 0 0 240 63].


So where is the sds1000x file as expecting V3 or any else?? Also 20kV_1kHz_C2 as 20E3 Volts !!??  :palm:

In addition to provide as to control each read values as:

- Y Scaling in Volts
- Y Offset readings as in Volts
- Probe scales as xxxx
- samples given from X time scales

Hp
« Last Edit: March 01, 2024, 10:48:49 am by hpw »
 

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Re: Siglent: SigScopeLab & Binary File
« Reply #27 on: March 01, 2024, 10:52:49 am »
That is scope OFFLINE application. This is literally software that runs on scope but compiled for Windows.
Many manufacturers have the same.
It is very powerful thing. You can save a signal in the office, put it on laptop and analyse (math decode, whatever) later...

I didn't try it in depth yet, but I also had some intermittent connection problems.
Or shall I say, more like timeouts on longer timebases..

Offline or even years later to repeat the measurements with any better tools  :-+

Reading BIN files is limited to 2M samples, so FFT and scale down is impossible.  :palm:
 

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6663
  • Country: hr
Re: Siglent: SigScopeLab & Binary File
« Reply #28 on: March 01, 2024, 11:49:58 am »
That is scope OFFLINE application. This is literally software that runs on scope but compiled for Windows.
Many manufacturers have the same.
It is very powerful thing. You can save a signal in the office, put it on laptop and analyse (math decode, whatever) later...

I didn't try it in depth yet, but I also had some intermittent connection problems.
Or shall I say, more like timeouts on longer timebases..

Offline or even years later to repeat the measurements with any better tools  :-+

Reading BIN files is limited to 2M samples, so FFT and scale down is impossible.  :palm:

Hmm,

as I said, will look into it when I have time.
Thanks for details...

Best,
 

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Re: Siglent: SigScopeLab & Binary File
« Reply #29 on: March 01, 2024, 06:53:27 pm »
I have attached two files: one of ~15V p2p sine wave from the sds1000x and one ~20V p2p square wave from the sds2K+. The SDS2K+ is taken with 8 bits. I did more digging and realized I was reading hex wrong and I think the error is reading the ch1_volt_div_val. The matlab code reads the sds1000x totally fine but it doesn't does the sds2K+ with V4. At 0x18-0x3f when it is supposed to be reading a volt_div_val scaling of ~4V for channel 1, it reads 1V for channel 1 and completely wrong numbers for the other channels. I believe at 0x18-0x3f the first 8 bits are for the 64-bit float point and this reads [0 0 0 0 0 0 240 63]. I don't actually know how to convert this to a decimal but that doesn't look correct?

Thanks a lot for the help

As your file with large probe settings  :palm:

Source File: sds2000xplus_square.bin
Format is 8bit
--------------------------------------------
Ch-1 is ON
Scale: 1
Magnitude: 8
Probe: 4000
Offset: 0
Div Value: 30

And opened question:

As your 4000 gain probe, please provide a BIN with any Offset (<> 0). While nothing mentioned whether the offset has to
multiplied by the probe attenuation's.

As real Offset * probe attenuation??


 

Offline antian

  • Contributor
  • Posts: 15
  • Country: us
Re: Siglent: SigScopeLab & Binary File
« Reply #30 on: March 03, 2024, 07:42:05 pm »
Hi,

I see in your ZIP

[1] 20kV_1kHz_C2_sample.bin as format V4!!!

[2] sds2000xplus_square.bin as format V4!!!

>> As I have attached two files: one of ~15V p2p sine wave from the sds1000x and one ~20V p2p square wave from the sds2K+.
>> The SDS2K+ is taken with 8 bits. I did more digging and realized I was reading hex wrong and I think the error is reading the
>> ch1_volt_div_val.
>> The matlab code reads the sds1000x totally fine but it doesn't does the sds2K+ with V4. At 0x18-0x3f when it is supposed to
>> be reading a volt_div_val scaling of ~4V for channel 1, it reads 1V for channel 1 and completely wrong numbers for the other
>> channels. I believe at 0x18-0x3f the first 8 bits are for the 64-bit float point and this reads [0 0 0 0 0 0 240 63].


So where is the sds1000x file as expecting V3 or any else?? Also 20kV_1kHz_C2 as 20E3 Volts !!??  :palm:

In addition to provide as to control each read values as:

- Y Scaling in Volts
- Y Offset readings as in Volts
- Probe scales as xxxx
- samples given from X time scales

Hp

Sorry it looks like I attached the wrong sds1000x file so I have correctly attached it here. It should be a 40 p2p / 2 kHz sine wave. The actual voltage of this is 40 kV but sometimes I don't define the probe as 1000x so it reads 40 p2p but sometimes I do set the proper probe like in the case of the other sds2000x file.

I have attached two files: one of ~15V p2p sine wave from the sds1000x and one ~20V p2p square wave from the sds2K+. The SDS2K+ is taken with 8 bits. I did more digging and realized I was reading hex wrong and I think the error is reading the ch1_volt_div_val. The matlab code reads the sds1000x totally fine but it doesn't does the sds2K+ with V4. At 0x18-0x3f when it is supposed to be reading a volt_div_val scaling of ~4V for channel 1, it reads 1V for channel 1 and completely wrong numbers for the other channels. I believe at 0x18-0x3f the first 8 bits are for the 64-bit float point and this reads [0 0 0 0 0 0 240 63]. I don't actually know how to convert this to a decimal but that doesn't look correct?

Thanks a lot for the help

As your file with large probe settings  :palm:

Source File: sds2000xplus_square.bin
Format is 8bit
--------------------------------------------
Ch-1 is ON
Scale: 1
Magnitude: 8
Probe: 4000
Offset: 0
Div Value: 30

And opened question:

As your 4000 gain probe, please provide a BIN with any Offset (<> 0). While nothing mentioned whether the offset has to
multiplied by the probe attenuation's.

As real Offset * probe attenuation??



In the sds2000x file, I was using a power supply with a 4000:1 voltage readout so the probe was set at 4000:1. There should have not been any offset, but it is possibly it was small. I'll make a file tomorrow with an offset. To make sure I am reading BIN correct, the ch1_probe should be at 0x244 - 0x24b and that address reads [0 0 0 0 0 64 175 64]. Does that translate to 4000 as a 64 bit float or am I looking at something/somewhere wrong? My code is reading the probe and vert_offset values incorrectly but does the offset get saved prior to the probe attenuation or after?

Thanks
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26907
  • Country: nl
    • NCT Developments
Re: Siglent: SigScopeLab & Binary File
« Reply #31 on: March 03, 2024, 09:01:10 pm »
Hi,

had installed the SigScopeLab a couple of days ago on a WIN10 computer.
Unfortunately the software crashes always and already when trying to connect to the scope.
What a piece of s*****.  :--
Also the GUI doesn´t look intuitive at all.
Fortunately the Webserver functions well .... so there seems hardly any need for a another piece of crappy software ... or?

regards
Calvin

I don't know about stability on your PC. You should contact Siglent support for that.
Probably a good option. However, there are a myriad of reasons why software crashes on a Windows PC. Language & localisation settings, filesystem access rights, registry settings, graphics driver capabilities, I/O ports that behave oddly, missing or extra updates which change certain API behaviour, etc, etc. In 99% of the cases the programmer is to blame for not testing on all Windows versions with all localisations and various update levels. Typically the root cause is not checking whether an API call returns a valid pointer which in turn can produce an error message which can point to where the program went wrong. Writing robust & serviceable software is much harder than it looks.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Re: Siglent: SigScopeLab & Binary File
« Reply #32 on: March 03, 2024, 09:48:29 pm »
Hi,

I see in your ZIP

[1] 20kV_1kHz_C2_sample.bin as format V4!!!

[2] sds2000xplus_square.bin as format V4!!!

>> As I have attached two files: one of ~15V p2p sine wave from the sds1000x and one ~20V p2p square wave from the sds2K+.
>> The SDS2K+ is taken with 8 bits. I did more digging and realized I was reading hex wrong and I think the error is reading the
>> ch1_volt_div_val.
>> The matlab code reads the sds1000x totally fine but it doesn't does the sds2K+ with V4. At 0x18-0x3f when it is supposed to
>> be reading a volt_div_val scaling of ~4V for channel 1, it reads 1V for channel 1 and completely wrong numbers for the other
>> channels. I believe at 0x18-0x3f the first 8 bits are for the 64-bit float point and this reads [0 0 0 0 0 0 240 63].


So where is the sds1000x file as expecting V3 or any else?? Also 20kV_1kHz_C2 as 20E3 Volts !!??  :palm:

In addition to provide as to control each read values as:

- Y Scaling in Volts
- Y Offset readings as in Volts
- Probe scales as xxxx
- samples given from X time scales

Hp

Sorry it looks like I attached the wrong sds1000x file so I have correctly attached it here. It should be a 40 p2p / 2 kHz sine wave. The actual voltage of this is 40 kV but sometimes I don't define the probe as 1000x so it reads 40 p2p but sometimes I do set the proper probe like in the case of the other sds2000x file.

I have attached two files: one of ~15V p2p sine wave from the sds1000x and one ~20V p2p square wave from the sds2K+. The SDS2K+ is taken with 8 bits. I did more digging and realized I was reading hex wrong and I think the error is reading the ch1_volt_div_val. The matlab code reads the sds1000x totally fine but it doesn't does the sds2K+ with V4. At 0x18-0x3f when it is supposed to be reading a volt_div_val scaling of ~4V for channel 1, it reads 1V for channel 1 and completely wrong numbers for the other channels. I believe at 0x18-0x3f the first 8 bits are for the 64-bit float point and this reads [0 0 0 0 0 0 240 63]. I don't actually know how to convert this to a decimal but that doesn't look correct?

Thanks a lot for the help

As your file with large probe settings  :palm:

Source File: sds2000xplus_square.bin
Format is 8bit
--------------------------------------------
Ch-1 is ON
Scale: 1
Magnitude: 8
Probe: 4000
Offset: 0
Div Value: 30

And opened question:

As your 4000 gain probe, please provide a BIN with any Offset (<> 0). While nothing mentioned whether the offset has to
multiplied by the probe attenuation's.

As real Offset * probe attenuation??



In the sds2000x file, I was using a power supply with a 4000:1 voltage readout so the probe was set at 4000:1. There should have not been any offset, but it is possibly it was small. I'll make a file tomorrow with an offset. To make sure I am reading BIN correct, the ch1_probe should be at 0x244 - 0x24b and that address reads [0 0 0 0 0 64 175 64]. Does that translate to 4000 as a 64 bit float or am I looking at something/somewhere wrong? My code is reading the probe and vert_offset values incorrectly but does the offset get saved prior to the probe attenuation or after?

Your SDS1000x, as converting it to csv:

Version 1 as reading as Hex Editor Neo


Record Length   Analog:1400000   
Sample Rate   1000000000   
Vertical Scale   CH1:+3.380000E+000 CH3:+3.620000E-002   
Vertical Offset   CH1:+0.000000E+000 CH3:-4.488800E-002   
Horizontal Scale   1.00E-04   
Second   Volt   Volt
-0.000728   4.87E+00   1.16E-02
-0.000727999   4.87E+00   1.01E-02
-0.000727998   5.00E+00   1.16E-02
-0.000727997   5.00E+00   1.16E-02
-0.000727996   5.00E+00   1.16E-02

Is IMHO a complete different header with spec's. As SD2K+ writes for each channel a different file (not what the spec's V4 tells).

Best to use the BIN file and convert it to csv and read the first settings & sample values.

Repeat until you get what is given within the csv file, so your V4 specification readings matches.

Attached an example with probe settings and offset... as cvs and my text data should match

Hp


« Last Edit: March 03, 2024, 09:51:24 pm by hpw »
 

Offline antian

  • Contributor
  • Posts: 15
  • Country: us
Re: Siglent: SigScopeLab & Binary File
« Reply #33 on: March 04, 2024, 02:45:51 am »
Yeah with your data it looks like my processing script has the same errors. So I wouldn't mind to have everything converted to a CSV and then read the CSV but I have to first get this script to read it properly. For my work I have literally hundreds of BIN files that I then loop through with some signal analysis and I don't want to manually click each one so if there's a way I can run the exe for all the files in a folder, that would be great. I tried briefly to do a button-pressing based automation of this but if you simply copy and paste the path of the BIN into FileConverter.exe file, it didn't work for me and I had to manually click the BIN file for that exe to work.

For my script I am now manually reading every byte and it properly reads the version (4), data offset btye, and which channels are on, but the ch_volt_div_vals are not correct and I am slowly getting more confused the more I dig in. I am looking at your file and ch2_volt_div_val should be at 0x40-0x67. It looks that corresponds to the bytes

[252
169
241
210
77
98
96
63]

Based on the CSV file, I should possibly expect this to translate to 0.005. However, When I used the binary reading Matlab function and defining a float64,it reads that set of 8 8-bits as 2.12e314 which cant be correct. When I manually convert that array into its binary, concatenate those binary numbers into [1111000010111110111001111011000111001001100010010001010101101001], that translates into something also wrong but am i just using a wrong calculator? This is the same issue with my own SDS2K+ files. I plan to look at a file with the same signal across the sds1000x and sds2K+ to see if that helps me figure our what in the world matlab is reading.
 

Offline hpwTopic starter

  • Frequent Contributor
  • **
  • Posts: 366
  • Country: 00
Re: Siglent: SigScopeLab & Binary File
« Reply #34 on: March 04, 2024, 08:09:21 am »

As for BIN files, I suggest you to use the "Hex Editor Neo" as you are able to convert HEX to Word / DWord / Double
and really see whats the beef within HEX Editor data. Sometimes the float are different aligned as not starting at 8x.
So simple select and copy the double data to a new file and get 8x aligned starting.

- Or simple dump your header data as text before doing any else steps. As your SDS1000 Matlab code is doing it right.

- Or ask someone who is fit with Matlab. I am NOT not fit with Matlab is for me still $$k :palm: or use Octave.

- The draw back is may,  as you do not get any Matlab debugger  :phew:

Hp




 

Offline martin1959

  • Newbie
  • Posts: 4
  • Country: de
    • Tele-Commies
Re: Siglent: SigScopeLab & Binary File
« Reply #35 on: March 05, 2024, 10:16:00 am »
When running SigScopeLab on a Windows 10 machine with German language settings, the software starts but has trouble with number formats, i.e. decimal separator.
Using the software, I set the horizontal time to "2,0 ms/div" (2 milliseconds). The software does not understand the "," decimal separator (as used in Germany) and wrongly sets the horizontal time to 2s/div (2 seconds).

I then changed the MS Windows setting to use "." as decimal separator and then the SigScopeLab software was happy with it.
 
The following users thanked this post: 2N3055

Offline antian

  • Contributor
  • Posts: 15
  • Country: us
Re: Siglent: SigScopeLab & Binary File
« Reply #36 on: March 06, 2024, 09:42:10 am »

As for BIN files, I suggest you to use the "Hex Editor Neo" as you are able to convert HEX to Word / DWord / Double
and really see whats the beef within HEX Editor data. Sometimes the float are different aligned as not starting at 8x.
So simple select and copy the double data to a new file and get 8x aligned starting.

- Or simple dump your header data as text before doing any else steps. As your SDS1000 Matlab code is doing it right.

- Or ask someone who is fit with Matlab. I am NOT not fit with Matlab is for me still $$k :palm: or use Octave.

- The draw back is may,  as you do not get any Matlab debugger  :phew:

Hp

As an update, I finally got it working for the SDS2000X. I was not reading the 3 sets of the 64-bit float points after each value for ch_volt_div_val, ch_vert_offset, etc. This was a painful way to learn binary but I really appreciate the help. I'll upload an updated version of it on the matlab forums.
 
The following users thanked this post: Performa01


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf