ps6000EnumerateUnits NULL not accepted

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

ps6000EnumerateUnits NULL not accepted

Post by johndmcmaster »

According to https://www.picotech.com/download/manua ... -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.

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

Re: ps6000EnumerateUnits NULL not accepted

Post by NeilH »

Hi

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 support@picotech.com though these are still a work in progress and haven't been tested on a linux platform yet.
Neil
Technical Support Engineer

Post Reply