Python SDK voltage ranges PS6000a

Post general discussions on using our drivers to write your own software here
Post Reply
hakon
Newbie
Posts: 0
Joined: Fri Jan 13, 2023 1:52 pm

Python SDK voltage ranges PS6000a

Post by hakon »

Examples for PS6000a and others use only numeric values for setting scope measurement voltage ranges.
I did this change to PicoEnumDevices.py.
Could something like this be added to the SDK, or is there a method already?


def _define_voltage_ranges():
PICO_10MV= 0
PICO_20MV = 1
PICO_50MV = 2
PICO_100MV = 3
PICO_200MV = 4
PICO_500MV = 5
PICO_1V = 6
PICO_2V = 7
PICO_5V = 8
PICO_10V = 9
PICO_20V = 10

return {k.upper(): v for k, v in locals().items() if k.startswith("PICO")}

picoEnum.PICO_VOLTAGE_RANGE = _define_voltage_ranges()

AndrewA
PICO STAFF
PICO STAFF
Posts: 401
Joined: Tue Oct 21, 2014 3:07 pm

Re: Python SDK voltage ranges PS6000a

Post by AndrewA »

I have added ticket to SDK examples system, to cover this.
For the 6000a API they should be added here-
https://github.com/picotech/picosdk-pyt ... ceEnums.py
as these are global enums used in the SDK.
I did notice other examples where they not defined.
Regards Andrew
Technical Specialist

Post Reply