11-25-2009 01:51 PM
I'm trying to access some functions from Vector's vxlapi.dll but I'm failing miserably as the data structures is too complex for me. Would you please give me directions (or provide a simple VI) in order to call the following function by using a Call Library Function node? I'm stucked mostly on how to create the controls to implement the structures below. Thanks a lot.
The function I want to call:
XLstatus xlGetDriverConfig(XLdriverConfig *pDriverConfig)
XLstatus is an unsigned char and XLdriverConfig type is as follows:
typedef struct s_xl_driver_config {
unsigned int dllVersion;
unsigned int channelCount;
unsigned int reserved[10];
XLchannelConfig channel[XL_CONFIG_MAX_CHANNELS];
} XLdriverConfig;
typedef struct s_xl_channel_config {
char name [XL_MAX_LENGTH + 1];
unsigned char hwType;
unsigned char hwIndex;
unsigned char hwChannel;
unsigned short transceiverType;
unsigned int transceiverState;
unsigned char channelIndex;
XLuint64 channelMask;
unsigned int channelCapabilities;
unsigned int channelBusCapabilities;
unsigned char isOnBus;
unsigned int connectedBusType;
XLbusParams busParams;
unsigned int driverVersion;
unsigned int interfaceVersion;
unsigned int raw_data[10];
unsigned int serialNumber;
unsigned int articleNumber;
char transceiverName [XL_MAX_LENGTH + 1];
unsigned int specialCabFlags;
unsigned int dominantTimeout;
unsigned int reserved[8];
} XLchannelConfig;
typedef struct {
unsigned int busType;
union {
struct {
unsigned int bitRate;
unsigned char sjw;
unsigned char tseg1;
unsigned char tseg2;
unsigned char sam;
unsigned char outputMode;
}can;
unsigned char raw[32];
}data;
} XLbusParams;
//defines for xlGetDriverConfig structures
#define XL_MAX_LENGTH 31
#define XL_CONFIG_MAX_CHANNELS 64
12-14-2009 04:41 PM
Hello Automan,
I think your question is more related to using the call library function node in LabVIEW. I would suggest looking at the help for the call library node, or maybe ask your question in the LabVIEW forums.
I'm sorry if this is not much help...
07-29-2011 07:01 AM
Hi
I have developed the VI for calling this function. If you have still face this problem you can email me.
mahyar.master@gmail.com
Thanks
04-02-2012 10:05 AM
I do still have trouble with this function : it is not imported by the labviews function "import dll" (many other yes, but not this function).