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

0 Members and 1 Guest are viewing this topic.

Online 2N3055

  • Super Contributor
  • ***
  • Posts: 6667
  • 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: 367
  • 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: 367
  • 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: 6667
  • 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: 367
  • 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
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26915
  • 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: 367
  • 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: 367
  • 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