-
Notifications
You must be signed in to change notification settings - Fork 357
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 sds hd support #245
base: master
Are you sure you want to change the base?
Conversation
…c Kuzmenko) in this PR : github.com/sigrokproject/pull/176/ Created a new protocol version "E11" matching the latest Siglent SDS Scope programming guide. Reduced the read-wait time from 7sec to 50ms for better performance (achived by looping on read sample logic to consume the data has it arrives). Tested with SDS2504X HD model connected via Ethernet cable.
…0X HD, 3000X HD, 5000, 6000 and 7000.
…ing communication stack to get the data from the device.
Fixed compilation warnings.
Read block length from block header for both analog and digital channels. Added use of WAV:POIN to specify block length as suggested in Siglent code exmaples.
…isition. Removed unused SCPI commands for E11 prtocol
…o 5mV instead of 500 uV). Fixed vertical ranges lower than 10mV for E11 models.
.gitignore
Outdated
@@ -80,3 +80,4 @@ stamp-h? | |||
/tests/*.log | |||
/tests/*.trs | |||
/tests/main | |||
.vscode/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest moving this to line 18, it might help accelerate the merging
@@ -106,7 +106,7 @@ static const uint64_t timebases[][2] = { | |||
|
|||
static const uint64_t vdivs[][2] = { | |||
/* microvolts */ | |||
{ 500, 100000 }, | |||
{ 500, 1000000 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we'd want to split this to another bugfix PR, although it depends on the maintainers.
{ 50, 1 }, { 2, 1000 }, 18, 8, 1400363}, | ||
{ 50, 1 }, { 2, 1000 }, 18, 8, 25, 1400363}, | ||
[SDS1000CNL] = {VENDOR(SIGLENT), "SDS1000CNL", NON_SPO_MODEL, | ||
{ 50, 1 }, { 2, 1000 }, 18, 8, 1400363}, | ||
{ 50, 1 }, { 2, 1000 }, 18, 8, 25, 1400363}, | ||
[SDS1000DL] = {VENDOR(SIGLENT), "SDS1000DL", NON_SPO_MODEL, | ||
{ 50, 1 }, { 2, 1000 }, 18, 8, 1400363}, | ||
{ 50, 1 }, { 2, 1000 }, 18, 8, 25, 1400363}, | ||
[SDS1000X] = {VENDOR(SIGLENT), "SDS1000X", SPO_MODEL, | ||
{ 50, 1 }, { 500, 100000 }, 14, 8, 14000363}, | ||
{ 50, 1 }, { 500, 1000000 }, 14, 8, 25, 14000363}, | ||
[SDS1000XP] = {VENDOR(SIGLENT), "SDS1000X+", SPO_MODEL, | ||
{ 50, 1 }, { 500, 100000 }, 14, 8, 14000363}, | ||
{ 50, 1 }, { 500, 1000000 }, 14, 8, 25, 14000363}, | ||
[SDS1000XE] = {VENDOR(SIGLENT), "SDS1000XE", ESERIES, | ||
{ 50, 1 }, { 500, 100000 }, 14, 8, 14000363}, | ||
{ 50, 1 }, { 500, 1000000 }, 14, 8, 25, 14000363}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, maybe split into another bugfix PR
src/hardware/siglent-sds/api.c
Outdated
case 100000: | ||
cmd = g_strdup_printf("%" PRIu64 "UV", p); | ||
break; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we fixed the bug on uV being 10^5, maybe this should be 1,000,000 too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
May I suggest a few changes, so hopefully the merge will be faster?
(And no, I'm not a maintainer. Just another fella owning one of those scopes)
Thanks for the feedback @doge-gif ! I'll take your proposals (but I'm not creating a separate PR). |
/* SDS2000X+: Since the LA sample rate is a fraction of the sample rate of the analog channels, | ||
* there needs to be repeated "fake" samples inserted after each "real" sample | ||
* in order to make the output match the timebase of an enabled analog channel. | ||
* The scaling by a factor of 2.5 and 5 appears to be necessary due to an artifact | ||
* where the instrument will present half of the entire sample quantity from the screen | ||
* within a single block (625000 bytes, or 5000000 bits / samples). Which means there | ||
* are some legitimate points missing that are filled with "fake" ones at larger timebases. */ | ||
for (int i = 0; i < samplerate_ratio-1; i++, ii++) | ||
g_array_append_val(tmp_samplebuf, tmp_value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get why up-sampling of the digital data has been done here, however it has the unintended consequence of causing the Decoders to produce inaccurate data.
In my test case I have D9 which is approximately a 134kHz PWM square wave generated by MCU and CH1 which is an AC wave in sync with the PWM signal. When no up-sampling is performed the PWM decoder correctly calculates the PWM signal on D9.
When a larger time base is used an up-sampling is applied to D9, the PWM decoder outputs the wrong data.
� Is it possible for some type of warning/notification to be drawn over D9 when up-sampling occurs to warn the user?
Hi,
This PR is based on the work of Eric Kuzmenko (#176).
It's been discussed on EEVblog forum and tested by different users on SDS 2000X HD, 800X HD, 1000X HD, and 2000X plus : https://www.eevblog.com/forum/testgear/new-sigrokpulseview-hardware-support-(siglent-sds-hd-rigol-dho800-)/
I've tried not to change any behavior of the original driver.
There are known limitations on digital channels of 2000X HD for memory depth > 5Mpts due to a bug in Siglent's firmware. I am exchanging with Siglent support team about that.
Please let me know if you have any comment.
Best regard,
Frederic.