-
Notifications
You must be signed in to change notification settings - Fork 124
WIP: Rigol oscilloscope refactor #1017
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
base: master
Are you sure you want to change the base?
Conversation
Differentiate between scope families and then group their common behavior in switch statements. This is more flexible approach and allow more fine tuned, per family behavior than immediately grouping them by protocol. - use smart pointers where it makes sense - use vector/array rather than C arrays DS1000Z - implemented memory/samplerate configuration - improved download speed - improved trigger poll performance/robustness Other families should have same handling as before.
to make sure all scope families are handled everywhere
When trigger offset was beyond memory range, at least DS1000Z never received trigger.
This is necessary, because samplerate changes timebase. While TB changes, Rigol oscilloscopes keep the trigger position constant relative to the capture mid point. Because scopehal reference point is at start, the trigger has to be updated to keep it constant from scopehal's POV.
As interleaving done automatically by scope is not considered to be an interleaving feature, see ngscopeclient#1014
This is happening with the pico-bridge, too, so probably a bug of ngscopeclient itself and not specific to any make or model of 'scopes. |
Initial tests with 1 channel and 1 MB chunks worked fine. Later tests with 2 channels failed, but 500 kB chunk size worked fine, but failed for 3 or 4 channels. It looks like the chunk size (maxpoints), also depends on the amount of enabled channels. There may be still some margin, but it's not worth chaseing it.
Proper resource locking was missing at multiple places. It may not be 100% complete yet.
- change verbose logs to trace - add more trace logs - print detected options - remove purely development logs
There are DHO4000 series scopes, which support 250 MHZ BW limit.
- all the series/model -> limiters logic is now in `GetChannelBandwidthLimiters` - `SetChannelBandwidthLimit` uses values from `GetChannelBandwidthLimiters` and uses nearest higher limit
it is more complicated than expected, no obvious rules
- deduce whole trigger state from data preamble rather than status - resilient against fast triggers skipping transitions - properly handles busy(wait)/armed(run) states
…ies::MSODS1000Z as there are also MSO scopes
MSODS1000Z was the only exception and it works there.
- recognize MSO1000Z as MSODS1000Z (tested) - recognize DHO800/DHO900/DHO1000/DHO4000 (untested)
only `double` for now, but templating allows easy addition of more
…nnel configuration - it may touch channels and it caused bugs when adding LA support
most of necessary includes are already included indirectly
- developed with MSO1000Z series - MSO5000/DHO900 implemented, but not tested
…o `std::optional`
|
@jwise I guess you have access to DHO4000 series scope. Could you give a shot to this PR? If you do please enable trace log for transport and RigolOscilloscope driver. |
…hannel - ATM only affects MSODS1000Z as there are collisions between digital banks and some analog channels
…lDivisor` because ATM this divisor behavior seems to be specific to MSODS1000Z only
…Depth` - we have to ensure, the trigger status does not change after we query it so we can restore correct value in the end
…g input - all supported except MSO5000
scopehal does not support it now, so it will not be listed in available trigger inputs
…dd MSO5000 as affected
…sableChannel` is called number of enabled channels may affect current samplerate, especially near the maximum rates
- it is dependent on how many analog channels are enabled
to not report `TRIGGER_MODE_TRIGGERED` when scope state == `TD`, because then the `ngscopeclient` immediately calls `AcquireData`, but data are available once the scope reaches `STOP` state, not `TD`.
…erate info in preamble
|
I got testing this tonight, ran into a small issue with the build. This was due to GetMso5000AnalogBankUsage not being declared. I've attached my commit for reference. murdoa@42dc699 Great work! It was a lot of fun testing out the DS1054Z on ngscopeclient with your contributions. |
|
@diggit where are we on this, is it ready to review and merge? Are we waiting on more testing? I'd like to get this in for v0.1.1 if possible. |
|
Oh, I did not think, such large code change would go into 0.1.x. It is not just a bugfix as it adds new features. DHOs are still untested and I am pretty sure I broke their support (unintentionally). I'll try to get access to one DHO800 this week, but no guarantees. Except testing, I am finished for now, unless we progress on some linked issues in OP (triggers, timebase updates). |
|
If you want to target 0.2 that's fine. I don't want to push you just checking in on status. |
This is a Rigol Oscilloscope driver refactor.
Related issues #943
I need testers for most scope families (see below).
Refactor
Supported devices and new features
Known issues (TBD):
non device specific
Triggers
Not yet supported devices