PS3405D: C++ sdk, ps3000aEnumerateUnits not working properly

Post your C and C++ discussions here
Post Reply
botest
Newbie
Posts: 0
Joined: Thu Dec 21, 2017 12:26 am

PS3405D: C++ sdk, ps3000aEnumerateUnits not working properly

Post by botest »

Hello,
I am using PS3405D and c++ sdk. I am trying to get device list with seiral #.
When trying to call ps3000aEnumerateUnits, the function returns ok and count is correct. but no "serials" and "serialLth" returned.
e.g.
rc = ps3000aEnumerateUnits (&count, serial_str, &serial_str_len);
rc = PICO_OK / count = 1 / serial_str = empty / serial_str_len = 0
(i currently just have 1 unit, but we will do multuple units setup later)

other calls are ok, i am able to connect, set up and get data etc.
any suggestion? is there other way to get device list?

please let me know if any info needed. Thank you,


Bo

Hitesh

Re: PS3405D: C++ sdk, ps3000aEnumerateUnits not working prop

Post by Hitesh »

Hi Bo,

Are you initialising the string being passed as the serials parameter?

If not, you will need to pass a non-empty string and a non-zero value for the serialLth parameter e.g.

Code: Select all

int16_t count = 0;
int8_t serials[100];
int16_t serialsLth = sizeof(serials);

PICO_STATUS status = ps3000aEnumerateUnits(&count, serials, &serialsLth);
Hope this helps,

botest
Newbie
Posts: 0
Joined: Thu Dec 21, 2017 12:26 am

Re: PS3405D: C++ sdk, ps3000aEnumerateUnits not working prop

Post by botest »

Thank you. i had serialsLth at 0. It works ok now.

Bo

Post Reply