-
Notifications
You must be signed in to change notification settings - Fork 79
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
ps3404D AWG Signal period wrong #186
Comments
our the device driver are hand written and manually vetted. PRs welcome to address any issues with specific models. Their capabilities vary quite a bit. |
Seeing similar issues with PS6424E. Update: |
Hi, Currently I'm trying to implement the AWG capability for the ps4000a series, and I noticed an issue with the deltaphase calculation, which seems to lead to improper signal duration. pico-python/picoscope/picobase.py Lines 1061 to 1063 in f092641
After digging in programmer's guides of the 3000a, 4000a, 6000 and 6000a series, it appears that the waveform length (number of samples) parameter is missing in the formula. Depending on the guide, the deltaPhase formula is rearranged differently, but all the variations are equivalent : ps6000a guide (p.110):
With or in ps3000a, ps4000a, ps6000 guides, respectively on pages 98, 101, 82:
With From these two definitions, we can see that the Since this calculation is done by the I can make a PR to fix this bug if needed, but it means modifying the signature of the "public" methods |
I guess we can just create two new methods with new names which compute deltaPhase and timeIncrement with the right formulas. The For the legacy methods, we just throw a warning or a DeprecationWarning when one calls |
My bad, after further investigations, it seems I was mistaken about the waveform size. In fact, it is already included in the I guess I was misleading because, as the op, I noticed some weird behavior when working with a waveform with a small number of samples at a low frequency, where the deltaPhase value tends to 0, i.e. where the resolution error becomes significant. Although, the pico-python slightly differs from calling directly the clib function Round instead of floor would extends the limits of the generator with low frequency and small number of samples, at the expense of a increased error, but it would be aligned with the clib function (will try include this in a PR). As a rule of thumb, it is preferable to work with a waveform discretized by the maximum number of sample allowed by the device, i.e. |
Hello,
although the ps3404D (not MSO) is not listed as a supported device I tried using its waveform generator. It works perfectly fine except for the fact that I have to divide time for the signal duration by the constant
5
. My Code works completely fine on some ps2000a devices and a ps3204A.I just wanted to notice this behavior, maybe it can be taken into account when it comes to the implementation for support for the ps3404D.
The text was updated successfully, but these errors were encountered: