ps6000EnumerateUnits NULL not accepted

Post general discussions on using our drivers to write your own software here
Post Reply
Posts: 0
Joined: Sat Jul 21, 2018 6:20 am

ps6000EnumerateUnits NULL not accepted

Post by johndmcmaster » Sat Jul 21, 2018 6:26 am

According to ... -guide.pdf

Section "3.4 ps6000EnumerateUnits", serials "Can be NULL on entry if serial numbers are not required." Presumably this also applies to serialLth, although this isn't explicitly stated. However, I observe (using pico-python):

m = self.lib.ps6000EnumerateUnits(byref(count), None, None): PICO_NULL_PARAMETER

m = self.lib.ps6000EnumerateUnits(byref(count), None, byref(serialLth)): PICO_NULL_PARAMETER

m = self.lib.ps6000EnumerateUnits(byref(count), byref(serials), byref(serialLth)): works

This is currently breaking pico-python which relies on NULL being accepted (self.lib.ps6000EnumerateUnits(byref(count), None, None)).

Platform: Ubuntu 16.04 x64

Version: libps6000 1.7.0-6r10 (installed today)

Please let me know if you need any more information.

Posts: 53
Joined: Tue Jul 18, 2017 8:28 am

Re: ps6000EnumerateUnits NULL not accepted

Post by NeilH » Thu Jul 26, 2018 11:24 am


The values being passed need to be pointer so a null pointer would be needed for the serials input but the serials length input doesn't accept a null value so you should need to a 0 to this as that is the "length" of the serials input.

We do have some new examples for python being created currently, if you would like to use these then email into though these are still a work in progress and haven't been tested on a linux platform yet.
Technical Support Engineer

Post Reply