Sending and receiving of CAN Messages (STD Frame Format) via ADS
Sending CAN messages via ADS
AdsWrite:
NETID = AoeNetId der EL6751
PORT = 200
IDXGRP = 16#F921
IDXOFFS = 0
LEN = Length of the following DATA,
DATA[0]: 1st CAN-Message, CAN-Id Bit 0-7
DATA[1], Bit 0-2: 1st CAN-Message, CAN-Id Bit 8-10
DATA[1], Bit 7: 1 = RTR (the length then indicates the number of data to be read, no data follows the message, the next CAN message starts at DATA [3]
DATA[2]: Length of the 1st CAN-Message
DATA[3-n]: Data of the 1st CAN-Message
DATA[(n+1)]: 2nd CAN-Message, CAN-Id Bit 0-7
etc.
Enable / disable CAN messages for receiving
For receiving, the CAN IDs must first be activated.
AdsWrite:
NETID = AoeNetId der EL6751
PORT = 200
IDXGRP = 16#F923
IDXOFFS = 0
LEN = Number of CAN-IDs * 2
DATA[0]: 1st CAN-ID, Bit 0-7
DATA[1]: 1st CAN-ID, Bit 8-11,
Bit 15=0: Activate for receiving
Bit 15=1: Deactivate for receiving
DATA[2]: 2nd CAN-ID, Bit 0-7
etc.
Reading the received CAN messages
AdsRead:
NETID = AoeNetId der EL6751
PORT = 200
IDXGRP = 16#F921
IDXOFFS = 0
LEN = 640 (maximum buffer size)
The DATA has the same structure when sending the CAN messages.
The buffer in the EL6751 comprises approx. 50 CAN messages (with 8 bytes of data per frame).
This feature is available from FW18.