Sending and receiving of CAN Messages (STD Frame Format) via ADS
Sending CAN messages via ADS
AdsWrite:
NETID = AoeNetId der EL6751PORT = 200IDXGRP = 16#F921IDXOFFS = 0LEN = Length of the following DATA,
DATA[0]: 1st CAN-Message, CAN-Id Bit 0-7DATA[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-MessageDATA[3-n]: Data of the 1st CAN-Message
DATA[(n+1)]: 2nd CAN-Message, CAN-Id Bit 0-7etc.Enable / disable CAN messages for receiving
For receiving, the CAN IDs must first be activated.
AdsWrite:
NETID = AoeNetId der EL6751PORT = 200IDXGRP = 16#F923IDXOFFS = 0LEN = Number of CAN-IDs * 2
DATA[0]: 1st CAN-ID, Bit 0-7DATA[1]: 1st CAN-ID, Bit 8-11,Bit 15=0: Activate for receivingBit 15=1: Deactivate for receivingDATA[2]: 2nd CAN-ID, Bit 0-7etc.Reading the received CAN messages
AdsRead:
NETID = AoeNetId der EL6751PORT = 200IDXGRP = 16#F921IDXOFFS = 0LEN = 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.