ps3000aEnumerateUnits() in LabVIEW?

Having problems ? let us know the details here
Post Reply
spflanze
User
User
Posts: 4
Joined: Wed Jul 11, 2018 11:36 pm

ps3000aEnumerateUnits() in LabVIEW?

Post by spflanze » Sat Sep 29, 2018 3:22 am

I need to use the ps3000aEnumerateUnits() in LabVIEW. I do not see this function in PicoScope3000a.llb . Is there a LabVIEW VI that accesses this? If not is there a dll I can access to create one?

Martyn
Site Admin
Site Admin
Posts: 3504
Joined: Fri Jun 10, 2011 8:15 am
Location: St. Neots

Re: ps3000aEnumerateUnits() in LabVIEW?

Post by Martyn » Mon Oct 01, 2018 1:59 pm

I don't believe we have added that function but you can create your function control block to action this directly in the dll . See section 4.6 of the Programmer's Guide

Just check against one of the existing PicoScope3000a.llb functions for parameter format.
Martyn
Technical Support Manager

spflanze
User
User
Posts: 4
Joined: Wed Jul 11, 2018 11:36 pm

Re: ps3000aEnumerateUnits() in LabVIEW?

Post by spflanze » Mon Oct 01, 2018 10:18 pm

Thanks for you reply.

I created ps3000aEnumerateUnits.vi using a Call Library Function node, linking it to ps3000a.dll, and selecting the function name ps3000aEnumerateUnits. When I did this I noticed there is another version of this function which is named ps3000aEnumerateUnits-2. It seems nearly all functions in that dll have a -2 version. This raised the question whether I am using the right one. With the version I selected the vi does seem to work.

Although it is working, I am concerned about memory management, and whether I will eventually get a segmentation fault. If I were using this function in a C or C++ program I would allocate a string buffer of the size I input in the serialLth input to passs to the serials argument. But this is LabVIEW which handles string buffer lengths dynamically. What I see in your examples is a zero length string input to the serials argument, and a serialLth input value of 256. Does this 256 value reflect a LabVIEW string's default buffer size?

Post Reply