Enums for PS5000A_WAVE_TYPE different in documentation and code (python)

Post general discussions on using our drivers to write your own software here
Post Reply
andreasjung
Newbie
Posts: 0
Joined: Thu Aug 03, 2023 5:57 am

Enums for PS5000A_WAVE_TYPE different in documentation and code (python)

Post by andreasjung »

The ps5000aSetSigGenBuiltIn() API expects a value from zero or larger for the waveType. (0=Sine etc.).
This is what thePS5000A_WAVE_TYPE enum in the documentation says (and this works).
However the enums in the picosdk have different values like

Code: Select all

(Pdb) ps

(Pdb) enums

(Pdb) enums.PICO_WAVE_TYPE["PICO_SINE"]
17
Expectation: the value should be 0, not 17. Am I missing something?

NeilH
PICO STAFF
PICO STAFF
Posts: 271
Joined: Tue Jul 18, 2017 8:28 am

Re: Enums for PS5000A_WAVE_TYPE different in documentation and code (python)

Post by NeilH »

Hi

The PicoDeviceEnums.py file contains the enumerations for the ps6000a driver only so for the ps5000a driver you need to use those from the documentation for the ps5000a but currently these aren't implemented as enums in the ps5000a.py file in the picosdk section of the repo so just passing the expected number will work.

Neil
Neil
Technical Support Engineer

Post Reply