using 2 PS6824E with python

Post general discussions on using our drivers to write your own software here
Post Reply
markusfa
Newbie
Posts: 0
Joined: Tue Aug 24, 2021 9:11 am

using 2 PS6824E with python

Post by markusfa »

Hi,

I will use 2 PS6824E and control it with python.
problem is, I don´t have success with
"ps6000aGetUnitInfo"
There is alwas message returned:
Exception has occurred: ArgumentError
argument 2: : wrong type
File "C:\xxx\xxx\xxx\xxx\xxx\PS6824E.py", line 80, in
status["getInfo"] = ps.ps6000aGetUnitInfo(chandle, ctypes.byref(string), stringLength, ctypes.byref(requiredSize), PSINFO)
code:
# Get Info from scope
string = (ctypes.c_char * 40)()
stringLength = ctypes.c_int16(40)
requiredSize = ctypes.c_int16()

# info Example
# 0 PICO_DRIVER_VERSION - Version number of ps6000a DLL
# 1 PICO_USB_VERSION - Type of USB connection to device
# 2 PICO_HARDWARE_VERSION - Hardware version of device
# 3 PICO_VARIANT_INFO - Model number of device
# 4 PICO_BATCH_AND_SERIAL - Batch and serial number of device
# 5 PICO_CAL_DATE - Calibration date of device
# 6 PICO_KERNEL_VERSION - Version of kernel driver
# 7 PICO_DIGITAL_HARDWARE_VERSION - Hardware version of the digital section 1
# 8 PICO_ANALOGUE_HARDWARE_VERSION - Hardware version of the analog section 1
# 9 PICO_FIRMWARE_VERSION_1 - Version information of Firmware
# A PICO_FIRMWARE_VERSION_2 - Version information of Firmware

PSINFO = ps0.PICO_INFO["PICO_VARIANT_INFO"]
print(PSINFO)

status["getInfo"] = ps.ps6000aGetUnitInfo(chandle, ctypes.byref(string), stringLength, ctypes.byref(requiredSize), PSINFO)
assert_pico_ok(status["getInfo"])

print(string.value)

When I try lib ps6000 there is no error warning for wrong type!
But with wrong driver result is no device found!
Thats ok.

PS6000a examples are working fine!
Can anyone help where is the bug?

Any other ways to have defined controlled access to two picoscopes on one PC?

thanks
Markus

Post Reply