Python - OpenUnit with Serial Number

Post general discussions on using our drivers to write your own software here
Post Reply
AndrewA
PICO STAFF
PICO STAFF
Posts: 400
Joined: Tue Oct 21, 2014 3:07 pm

Python - OpenUnit with Serial Number

Post by AndrewA »

You can open a unit with a specific serial by passing with the openunit function.
I managed to get the scope to open via serial by adding the code below to one of our ps4000a examples-

Code: Select all

p_serial = ctypes.create_string_buffer(b"JO259/0994")     # create a buffer containing a NUL terminated string
print("Passing a NULL terminated string-")
print(repr(p_serial.raw))
print("With a size of (bytes)-")
print(ctypes.sizeof(p_serial))
status["openunit"] = ps.ps4000aOpenUnit(ctypes.byref(chandle), p_serial )
Regards Andrew
Technical Specialist

Post Reply