Test and Measurement Forum

PS3405D: C++ sdk, ps3000aEnumerateUnits not working properly

Post your C and C++ discussions here

PS3405D: C++ sdk, ps3000aEnumerateUnits not working properly

Postby botest » Fri Jan 12, 2018 8:42 pm

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
botest
Newbie
 
Posts: 0
Joined: Thu Dec 21, 2017 12:26 am

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

Postby Hitesh » Mon Jan 15, 2018 10:11 am

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,
Hitesh

Technical Support Engineer
Hitesh
Site Admin
Site Admin
 
Posts: 2655
Joined: Tue May 31, 2011 3:43 pm
Location: St. Neots, Cambridgeshire

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

Postby botest » Tue Jan 16, 2018 5:44 pm

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

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


Return to C and C++

Who is online

Users browsing this forum: No registered users and 1 guest