beautypg.com

B&B Electronics I-7565-H2 - Manual User Manual

Page 53

background image

Examples :
Int Ret, i;
BYTE CAN_No;
BYTE CANMsg_Mode, CANMsg_RTR, CANMsg_DLC, CANMsg_Data[8];
DWORD CANMsg_ID, CANMsg;
Double CANMsg_Time;
_VCI_CAN_MSG CAN_RecvMsg;

CAN_No=1;
Ret = VCI_RecvCANMsg(CAN_No, &CAN_RecvMsg); // Recv CAN Msg
CANMsg_Mode = CAN_RecvMsg.Mode;
CANMsg_RTR = CAN_RecvMsg.RTR;
CANMsg_ID = CAN_RecvMsg.ID;
CANMsg_DLC = CAN_RecvMsg.DLC;
CANMsg_Time =
(double)(CAN_RecvMsg.TimeH*pow(2.0,32.0))+(double)((double)CAN_R
ecvMsg.TimeL/10000));
For(i=0; i< CANMsg_DLC; i++){

CANMsg_Data[i] = CAN_RecvMsg.Data[i]

}

I-7565-H1/H2 High Speed USB/CAN Converter User’s Manual (Ver 1.1, Nov/2009) ------------- 53