Skip to content
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

Issue with serial number length in ps6000a for enumerate units function #204

Open
brianm92 opened this issue Nov 13, 2024 · 0 comments
Open

Comments

@brianm92
Copy link

brianm92 commented Nov 13, 2024

Currently, the ps6000a._lowLevelEnumerateUnits function does not successfully return the serial number of a connected Picoscope 6000 series (tested using model 6426E).

Minimum working example:

from picoscope import ps6000a

ps = ps6000a.PS6000a(connect=False)

allSerialNumbers = ps.enumerateUnits()

print("Found the following device serial numbers: ")
for serial in allSerialNumbers:
    print(serial + "\n")

No serial number is returned (and no error raised either).

It seems that the issue lies with the serialLth = c_int16(count.value * (8 + 2)) line in ps6000a._lowLevelEnumerateUnits. If I change this to 9+2 (or more) instead of 8+2, the serial number is successfully returned. My serial number is of the format "AB123/4567" which is at 10 characters of length. I cannot check that this change works with more than one scope connected, so I'm not sure what the correct buffer length per unit should be for this.

As a starting point, can anyone confirm if the serial number format of other Picoscope series are different to the 6000 series, i.e., they have something other than the format "AB123/4567"?

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

No branches or pull requests

1 participant