PicoSDK Python Wrapper: EnumerateUnits

Post any questions you may have about our current range of oscilloscopes
Post Reply
GertDekkersMagics
Newbie
Posts: 0
Joined: Mon Oct 10, 2022 9:41 am

PicoSDK Python Wrapper: EnumerateUnits

Post by GertDekkersMagics »

Dear all,

I'm using the python wrapper of the PicoSDK to use a ps5000a. I'm able to init the device and use it in streaming mode. However, I'm not able to succesfully excecute the ps5000aEnumerateUnits function to list all available serials. It keeps on returning the fault:

Code: Select all

ctypes.ArgumentError: argument 2: : wrong type
The code to reproduce the above example:

Code: Select all

import ctypes
from picosdk.ps5000a import ps5000a as ps

count = ctypes.c_int16()
serialLth = ctypes.c_int16(1023)
serials = (ctypes.c_char * serialLth.value)()
ps.ps5000aEnumerateUnits(ctypes.byref(count), ctypes.byref(serials), ctypes.byref(serialLth))
I have picosdk 1.1 and picoscope 7.0.110-1r12747 on Ubuntu 20.04 LTS.

Thanks,
Best,

Post Reply