09-05-2019 04:32 PM
Hi,
I am trying to get a dll in labview to work with my project and am having trouble getting the library node to accept one of my parameters. The function I am using is defined below with an example from the documentation. MaxDeviceLen is defined as 512. I have tried creating an array of unsigned bytes with length 512, building it to a cluster for the struct, and then building it into an array to be input into the call library node but that did not work. I have also tried converting it into an array of clusters of strings to no avail, as well as a couple of other similar approaches. Any help on this would be greatly appreciated.
09-06-2019 07:12 AM - edited 09-06-2019 08:12 AM
Basically that string is inlined. So you need to allocate an array of U8 bytes with n * MaxDeviceLen elements (with n being the number of array elements you want to have and which better matches the third parameter passed to DelcomScanDevices() ) and pass that as Array Data Pointer to the DLL. Then to index the i-th element to pass to the DelcomOpenDevice() function you simply use ArraySubset with the offset set to i * MaxDeviceLen and the length as MaxDeviceLen and pass this array as Array Data Pointer to the DelcomOpenDevice() function.
09-06-2019 10:26 AM
Rolf,
Thank you for your reply. I have decided to go with another function that essentially does what I want instead and is a little easier to work with.
Thanks,
-Martin