From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

REALLY NEED URGENT HELP with typedef struct char in LabVIEW

Hi,

 

So I am calling a DLL inside my LabVIEW VI.

Inside the DLL, I have the following structure:

 

typedef struct

{

      char string[21];

} Geo_Tuple;

 

Then I used it here in a function by calling:

 

set_Geo_Coordinates(const File_or_Interactive State, const Input_or_Output Direction, const Geo_Tuple coordinates)

(Note that File_or_Interactive and Input_or_Output are typedef enum.)

 

So now, I am trying to implement this function in LV using the Call Function Node.

 

However, it's not working --> const Geo_Tuple coordinates does not have the correct structure.

 

So my question:

 

How do I implement

typedef struct

{

      char string[21];

} Geo_Tuple;

 

So that I can use it here: set_Geo_Coordinates(const File_or_Interactive State, const Input_or_Output Direction, const Geo_Tuple coordinates)

 

 

Thanks!

0 Kudos
Message 1 of 2
(2,751 Views)
How have you configured your call library node?  To get a representation in LabVIEW of your Geo_Tuple type you'll need to create a cluster that contains 21 U8 elements, which you can do by creating an empty U8 array and wiring it to "Array to Cluster" set to 21 elements.  Connect this to the input side of the call library node.  On the output side, convert back to an array, and from there convert it to a string.
0 Kudos
Message 2 of 2
(2,723 Views)