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 !!??
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
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 NeoRecord 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