Instructions
243 C-Control Pro IDE
© 2013 Conrad Electronic
0
CAN_10KBPS
10.000bps
1
CAN_20KBPS
20.000bps
2
CAN_40KBPS
40.000bps
3
CAN_100KBPS
100.000bps
4
CAN_125KBPS
125.000bps
5
CAN_200KBPS
200.000bps
6
CAN_250KBPS
250.000bps
7
CAN_500KBPS
500.000bps
8
CAN_800KBPS
800.000bps
9
CAN_1MBPS
1.000.000bps
5.5.5 CAN_Receive
CAN Bus Functions
Syntax
byte CAN_Receive(byte data[]);
Sub CAN_Receive(ByRef data As Byte) As Byte
Description
If messages are in the receive FIFO, the 14-byte data is copied in the user array, which must have a length
of 14 bytes. Is bit 31 of the IDT is set in the received message, then RTR was set in the CAN packet.
Parameter
data Array in which the CAN message is copied
Return Parameter
Length of CAN packet (0-8 Byte) or ff (Hex) if no packet was in buffer
Structure of the data set
Byte 0: MOb Number (0-14)
Byte 1-4: 29-Bit IDT (at V2.0 part A Msgs the upper bits are null)
Byte 5: Length of CAN Data (0-8)
Byte 6-13: Packetdata
5.5.6 CAN_MObSend
CAN Bus Functions
Syntax
void CAN_MObSend(byte mob, byte len, byte data[]);
Sub CAN_MObSend(mob As Byte, len As Byte, ByRef data As Byte);