Skip to content

Conversation

@preamp-org
Copy link

This is a first working draft. Basic functionality is given for the two scopes that I work with, but more testing is needed. Anyone with a 3000 or 6000 at hand, please test if I broke something for you.

Added support for digital trigger on 5000 series (tested) and 3000 series (untested). 4000 does not have a digital option.
Added the missing timebase calculations for formerly unsupported models.
Fixed a bug where the forced trigger was not properly reset after every acquisition.
Changing the voltage range on analog channels obviously necessitates clearing out the buffers in WaveformServerThread every time, lest the Thread will lock up occasionally.
Specify a certain series to open a model from via command line parameter --series.

This is useful for preparing shell scripts or desktop shortcuts that specify different ports for a certain series model. Valid arguments are 3, 4, 5, 6 or anything else starting with those numbers, like 6000E or 4000A.
Unrecognized arguments will fall back to the default behaviour of trying all supported series in ascending order, as if the parameter was not given at all.
@preamp-org preamp-org marked this pull request as ready for review November 9, 2025 12:55
Implemented model dependent AWG buffer size and fixed a bug where the function generator would start running on changing any parameter, even if it was set to OFF.
The scale value for the current trigger channel is always the same for the 6000E series (and the same for the external trigger input), but it varies with ADC resolution for other series. On some models it is even different for the external input and the analog channels. This is now taken into account.

Filtered out some illegal ":RANGE" commands that would otherwise spam the Debug Log. They occur if one or more digital channels are added to a WaveformView with analog channels and those voltage range gets adjusted, which does not work for digital channels.
@hansemro
Copy link

hansemro commented Nov 10, 2025

Thanks for your contribution! This seems to work fine with 3206D non-MSO and happy to report AWG is now working with your changes (addressing #18).

That said, I do still encounter lockups due to failed trigger conditions which leaves the scope trigger armed but unable to respond to further commands. From further testing, this seems to be a pre-existing but unreported/undocumented issue. @preamp-org Is this something you encounter as well?

@hansemro
Copy link

Testing with your scopehal changes (preamp-org/scopehal@7bd9aa6), I see the following ps6000d warnings on opening a connection:

Client connected to SCPI socket
Client connected to data plane socket
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10
Warning: GetTimebase failed, code 16 / 0x10

They seem otherwise harmless.

@hansemro
Copy link

lockups due to failed trigger conditions which leaves the scope trigger armed but unable to respond to further commands.

This might be a ngscopeclient/scopehal issue since it does not issue further SCPI commands while armed and awaiting for trigger. Attempting to stop acquisition only changes the trigger status in the Stream Browser window to STOPPED without actually stopping/aborting the acquisition.

@preamp-org
Copy link
Author

lockups due to failed trigger conditions which leaves the scope trigger armed but unable to respond to further commands.

This might be a ngscopeclient/scopehal issue since it does not issue further SCPI commands while armed and awaiting for trigger. Attempting to stop acquisition only changes the trigger status in the Stream Browser window to STOPPED without actually stopping/aborting the acquisition.

Yes, I think that this is not a problem of the pico-bridge but rather something more severe upstream. Might be related to https://github.com/ngscopeclient/scopehal-apps/issues/917.

I see those warnings, too. Didn't pay any attention to them, but fixed it now. Code 16 is PICO_INVALID_CHANNEL and probably happens before the channels are initialized properly. Simply filtered it out together with PICO_INVALID_TIMEBASE.

And thank you very much for testing! Good to know that it is working and useable for you :)

Selectable sample rates are now evenly spaced and span from 1kS/s as the lowest setting up to the highest available value. Since not all values are available on every device, there will be at most 8 different values per magnitude.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants