Thank you for your reply. The attachment is the header file. It should be noted that when the acceptance rate is low, the program can run normally.
zlgcan.h
Hi, I had a problem working with a CAN-bus equipment.
This is the flow chart of the device interface function call. (Image.png), What Structure, should I use to display RT Data on a multicolumn listbox while ensuring real-time ?
usbcan-e-u_demo_labview2010.zip
Trying to call the function below:
typedef struct tagZCAN_CHANNEL_INIT_CONFIG {
UINT can_type; //0:can 1:canfd
union
{
struct
{
UINT acc_code;
UINT acc_mask;
UINT reserved;
BYTE filter;
BYTE timing0;
BYTE timing1;
BYTE mode;
}can;
struct
{
UINT acc_code;
UINT acc_mask;
UINT abit_timing;
UINT dbit_timing;
UINT brp;
BYTE filter;
BYTE mode;
USHORT pad;
UINT reserved;
}canfd;
};
}ZCAN_CHANNEL_INIT_CONFIG;
CHANNEL_HANDLE ZCAN_InitCAN(DEVICE_HANDLE device_handle, UINT can_index, ZCAN_CHANNEL_INIT_CONFIG* pInitConfig);
Can anyone give me some tips on how to pass this structure with union into DLL?
Thanks for any help you can provide!
Hi
When I call the DLL, there is a structure:
struct Signal
{
uint32 nStartBit;
uint32 nLen;
double nFactor;
double nOffset;
double nMin;
double nMax;
double nValue;
uint64 nRawValue;
bool is_signed;
char unit[11];
char strName[66];
char strComment[201];
};
There is another Message structure to the above Signal:
struct Message
{
uint32 nSignalCount;
uint32 nID;
uint8 nExtend;
uint32 nSize;
Signal vSignals[513];
char strName[66];
char strComment[201];
}
The point is Signal vSignals[513];
I've tried to solve it like this,but the program will crash.
How to create struct Message ,any good suggestions? Thanks a lot.
message.vi