beautypg.com

3 vci_enablehwcyclictxmsg, Vci_enablehwcyclictxmsg – B&B Electronics I-7565-H2 - Manual User Manual

Page 54

background image

5.6.3 VCI_EnableHWCyclicTxMsg

This function is used to send CAN messages in the assigned CAN

port by using module hardware timer and it will be more precise than PC
software timer.

Syntax :

int

VCI_EnableHWCyclicTxMsg (

BYTE

CAN_No,

PVCI_CAN_MSG

pCANMsg,

DWORD

TimePeriod,

DWORD

TransmitTimes

);

Parameter :
CAN_No:

[in] The assigned CAN port number.

pCANMsg:

[in] A structure pointer of _VCI_CAN_MSG is used to set the CAN

message parameters shown as below.

typedef struct _VCI_CAN_MSG{

BYTE Mode;
BYTE RTR;
BYTE DLC;
BYTE Reserved;
DWORD ID;
DWORD TimeL;
DWORD TimeH;
BYTE Data[8];

} _VCI_CAN_MSG, *PVCI_CAN_MSG;

Mode : CAN message Mode (0: 11-bit; 1: 29-bit)
RTR : CAN message RTR (0: No RTR; 1: RTR)
DLC : CAN message Data Length (0~8)
ID : CAN message ID
TimeL : CAN message Time-Stamp (Lo-DWORD)
TimeH

:

CAN message Time-Stamp (Hi-DWORD)

Data[8]

:

CAN message Data Array



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