From the programming manual: "In EDGE mode, <src> could be CHANnel<n>, EXT, ACLine or DIGital<m>;" Note the full caps for DIG. This is _despite_ the return values only being Dxx syntax. (Thanks Riglol) A quick hack in src/hardware/rigol-ds/api.c where the ":TRIG:EDGE:SOUR %s" command is sent fixes triggering on digital channels, but I don't have an appropriate patch that's actually correct for the string manip in this library. The below doesn't handle channels 10..15 at all for instance... diff --git a/src/hardware/rigol-ds/api.c b/src/hardware/rigol-ds/api.c index 7a195bb..cc462ad 100644 --- a/src/hardware/rigol-ds/api.c +++ b/src/hardware/rigol-ds/api.c @@ -721,8 +721,10 @@ static int config_set(uint32_t key, GVariant *data, const struct sr_dev_inst *sd tmp_str = "CHAN3"; else if (!strcmp(devc->trigger_source, "CH4")) tmp_str = "CHAN4"; - else - tmp_str = (char *)devc->trigger_source; + else { + sprintf(tmp_str, "DIG%c", devc->trigger_source[1]); + //tmp_str = (char *)devc->trigger_source; + } ret = rigol_ds_config_set(sdi, ":TRIG:EDGE:SOUR %s", tmp_str); break; }
I haven't tested this properly yet but this commit ought to fix this: https://github.com/martinling/libsigrok/commit/7049b257a157977ba4b5f997fee9d8b8179eb63a