Hi,
I want to ask if anyone can check if what i am doing is correct. I'm calling an external dll and i have doubts about the data type in the function.
DWORD HiCOCANWrite( BYTE Can, psPCCanMsg msg, DWORD Timeout )
Can: Number of the node which is to transmit the message.
Msg: Pointer to message data
Timeout: Specifies the time HiCOCANWrite is waiting for a free entry in the transmit queue when the transmit queue is full.
the problem in the functionis the psPCCanMsg, that is a structure defined as,
typedef struct
{
BYTE ff; /* frame format: 0 = basic CAN, 1 = extended CAN */
BYTE rtr; /* 0 = normal frame, 1 = remote frame */
BYTE dlc; /* data length 0..8 */
DWORD id; /* telegram ID */
BYTE data[8]; /* data */
sTS timestamp; /* time stamp*/
}sPCCanMsg, *psPCCanMsg;
and the structure sTs is defined as,
typedef struct
{
WORD day;
BYTE hour;
BYTE min;
BYTE sec;
WORD ms;
WORD us; /* micro seconds; max. resolution 10μs */
}sTS, *psTS;
I used clusters for structures. i attach images of my labview code and the configuration in call libray.
The point is that the code is not working or does nothing. I'm using LabVIEW 7.1.
Please if anyone can help me I would appreciate it.
Thanks