04-18-2024 07:50 PM
I've had pretty good luck working with this DLL so far, but this function "GetInstrumentInfo" keeps crashing LabVIEW. I think it's because I don't have the correct data in the cluster that it expects. Please see the function definition below, and the cluster I have defined. All of the integers in the cluster are I32. Is there something obvious that I'm doing wrong?
Solved! Go to Solution.
04-18-2024 07:58 PM
You may need to send in one of the following:
A string that is just a bunch of blank characters equal in length to whatever SIZE_INSTRUMENT_NAME is
or
A U8 array the same length as SIZE_INSTRUMENT_NAME
04-19-2024 12:16 AM
You can use a u8 cluster with 32 elements. A string or array will not work since they are automatically passed by handle. After the call you can use cluster to array and byte array to string to get the name in LabVIEW.
04-19-2024 12:27 PM - edited 04-19-2024 12:27 PM
Thank you! The cluster of 32 bytes did the trick. (String and array still crashed LabVIEW but good ideas nonetheless).