PicoScope 7 Software
Available on Windows, Mac and Linux
PicoScope 7 Software
Available on Windows, Mac and Linux
OEM & custom applications
PicoScope, Pico data logger and RF products can be used as components in custom applications and OEM projects.
A to Z of PC oscilloscopes
Everything you need to know about PC oscilloscopes from Advanced Triggers to Zooming.
A to Z of Data Loggers
Everything you need to know about PC-based data loggers from Alarms to Zooming.
Application Notes
Details of some of the many applications for Pico data logger and oscilloscope products.
How do I measure...?
Find out how you can measure using Pico products
Videos
Showing you how to get the most out of PicoScope oscilloscope software.
Documentation
Up-to-date versions of the documentation supplied with your products in PDF format.
Educational Experiments
Our library of science experiments suitable for use with oscilloscope and data logging products.
PicoApps
Want to share hints, tips and code with other developers? Show your Pico-based products to the world.
Newsletter
Archive of our monthly Test and Measurement Newsletters.
code: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)
# 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)
Post by doug.kelly »
Code: Select all
def get_serial_number(self) -> str:
"""Returns SN from scope"""
info_string = (ctypes.c_char * 40)()
info_string_arg = ctypes.cast(ctypes.byref(info_string), ctypes.c_char_p)
string_length = ctypes.c_int16(40)
required_size = ctypes.c_int16(40)
required_size_arg = ctypes.cast(ctypes.byref(required_size), ctypes.c_void_p)
info = self.sdk.PICO_INFO["PICO_BATCH_AND_SERIAL"]
info_arg = ctypes.c_long(info)
status = self.sdk.ps6000aGetUnitInfo(
self.handle,
info_string_arg,
string_length,
required_size_arg,
info_arg,
)
self.functions.assert_pico_ok(status)
return info_string.value.decode("utf-8")
Return to “General Software Discussions”