On Wed, Aug 02, 2017 at 08:01 +0200, Soeren Apel wrote: > > Looking at the resulting file I noticed a more serious issue that > can still be fixed but it's a little less trivial: there is a 266us > shift between the data of both devices. > It makes perfect sense really but it's still an issue regardless. > I was hoping the difference would be too small to be noticeable but > we are talking fast (for humans) signals here, so even tiny delays > are becoming noticeably quickly.
I'd assume that this difference is non-deterministic. So I'd favour a programmatic approach to compensate for this effect. > [ ... ] > > b) auto-adjust the time offset by simply going through the data and > looking for data != 0, counting the number of samples up to that point. > Then, the difference between the counters for the two input files is > the offset, by which it can truncate the data for A and prepend the > data for B. Wouldn't work in all scenarios of course but for yours > (and a lot of others), this would be simple and yet correct. > > This way, you'd do both adjustments in a single run of the tool. > > What do you think? Agreed, assuming that either - each device has input signals connected such that the very first non-zero value across _all_ channels happens at _all_ devices at the same time (rather unusual, probably not a good idea to rely on, hard to enforce by users) - one signal is passed to each device, and is used to signal the synchronization, the tool then skips all samples in all srzip archives that lie before the significant edge of the common signal The latter approach unfortunately "costs" one input channel for every device except the first. Though it allows for reliable synchronization of an arbitrary number of devices. Which means that you could e.g. get 8 + 7 + 7 = 22 channels for USD25. :-O Better LAs have hardware support for this feature, though I don't know if sigrok currently supports any of the models. Asix Omega (currently planned but not yet implemented) has such a feature, to synchronize two devices with an absolute error of some 5ns to 20ns (haven't checked, guessed from memory, but it's that order of magnitude). Chaining more devices is not supported since this would bring the error above the sample interval, and thus voids the feature. virtually yours Gerhard Sittig -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ sigrok-devel mailing list sigrok-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sigrok-devel