Closed LongHairedHacker closed 7 years ago
D'oh I've just discovered my approach fails as well, if the memory depth is set to 'AUTO'.
Turns out updating to the latest firmware (00.04.04.03.02) seems to fix all of the oddities I encountered.
Thanks for your bug report. I'm glad that the latest firmware version works again as it should. I took the opportunity to power up my device again and work on this Python package. I will close this issue for now. Please reopen if you encounter a related problem or open a new one.
I've just noticed that get_waveform_samples("CHAN1", "RAW") always returns 1200 samples, from my DS1054z, regardless of the state of the scope or the configured memory depth.
After enabling logging reading through the debug output I realized that the points field in the waveform preamble is always set to 1200 for me, whereas memory_depth_curr_waveform returns the correct memory depth for all scenarios I've tested so far.
Here is a small piece of code to reproduce this:
The output while the scope is stopped, with only one channel active and the memory depth set to 12M manually is:
(I've removed the output for info as it contained only timing information.)
I'd like to know if anybody can reproduce this, or if this is a problem specific to my setup. If I can find the time next week, I'll try to reproduce it on my other DS1054z.
Meanwhile I've been able to get get_waveform_samples working for me, by using the memory_depth_curr_waveform instead of the points value from the waveform preamble to determine how many sample should be fetched from the scope. In theory this should not break anything else, as the modified line is in _get_waveform_bytes_internal.
I can also provide a pull request with my fix.