LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help figuring out what data type this DLL expects

Solved!
Go to solution

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?

 

capture.png

0 Kudos
Message 1 of 4
(162 Views)

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

Message 2 of 4
(156 Views)
Solution
Accepted by topic author Gregory

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. 

 

 

Message 3 of 4
(126 Views)

Thank you! The cluster of 32 bytes did the trick. (String and array still crashed LabVIEW but good ideas nonetheless). 

0 Kudos
Message 4 of 4
(95 Views)