06-16-2010 02:18 PM
I have a .dll that I'm trying to use in Labview with the "Call Library Function Node".
There is a function in this dll that uses a 'typedef struct' for it's parameter:
int BACDOCrequest(bdrbag *prqst)
When I go to "Configure->Parameters", what do I use for type and format? I figured I would use "Adapt to Type" but since 'brdbag' is a struct, I don't know how to configure the rest.
The dll author provided an example in C++.
Here is the typedef:
typedef struct {
dword passkey;
dword request;
dword deviceid;
dword objectid;
dword propid;
dword arrindex;
dword datatype;
dword value;
dword errorclass;
dword errorcode;
dword priority;
union {
char sval[256];
byte bval[256];
BACnetDate dval;
BACnetTime tval;
directaddr da;
datetime dtval;
HWND listbox;
bufptr buf;
Range rg;
} aux;
} bdrbag;
Later on, the function is called as follows:
bdrbag vb;
vb.deviceid=x;
vb.passkey=password;
vb.request=0;
h=BACDOCrequest(&vb);
Thanks for any help you can provide!
Don
06-16-2010 02:24 PM - edited 06-16-2010 02:27 PM
Don223 wrote:
typedef struct {
dword passkey;
dword request;
dword deviceid;
dword objectid;
dword propid;
dword arrindex;
dword datatype;
dword value;
dword errorclass;
dword errorcode;
dword priority;
union {
char sval[256];
byte bval[256];
BACnetDate dval;
BACnetTime tval;
directaddr da;
datetime dtval;
HWND listbox;
bufptr buf;
Range rg;
} aux;
} bdrbag;
You will want to create a cluster that has the same data and wire that up to the dll call. I'm not quite sure how LabVIEW handles unions though
06-16-2010 02:30 PM
11-01-2013 05:56 PM
Greg what was the result of this? Did it work?
:womanlol: