Industrial
Electronic Devices
ADFweb.com Srl – IT31010 – Mareno – Treviso INFO:
www.adfweb.com
Phone +39.0438.30.91.31
User Manual
CAN /Ethernet - Converter
Document code: MN67644_ENG Revision 1.200 Page 33 of 41
ETHERNET PROTOCOL WITH SERVER MODE
This protocol is able to read and write frames in the CAN net.
Write Frames
The transmission is very simple; it requires only what are the packets to send. In a single request it is possible to write at maximum 19
frames in the CAN net. The Bytes that composed the request are these:
Byte Number
Description
1
Write Identifier (0x02)
2
Number of frames to send
3÷6
Cob_ID
7
Number of Byte to send (0x01÷0x08)
8÷15
Data (Byte 8 is the higher, byte 15 is the lower)
A single frame is composed by 13 bytes (byte 3 to byte 15). If the “Number of frame to send” (Byte Number 2) has got a value greater than
zero, the next frame is composed from byte 3 to byte 15 and so for all the frames.
If the “Number of Byte to send” has got a value less than 0x08 the byte of Data unused must be put with value 0x00.
To choose the type of CAN (2.0A or 2.0B) of the frame that the converter will send, it is necessary to put the most significant bit of the byte
3 to:
•
0: CAN 2.0A;
•
1: CAN 2.0B.
The response is composed only by one byte. It can have two values:
•
0x00: No Errors;
•
0x01: Parameter Error.
Example:
We want to write three frames with the following characteristics:
Frame 1: CAN Type=2.0A; Cob_ID=0x0000018A; Number of Byte to send=8; Data=0x0102030405060708;
Frame 2: CAN Type=2.0B; Cob_ID=0x000413CB; Number of Byte to send=6; Data=0x1122334455660000;
Frame 3: CAN Type=2.0A; Cob_ID=0x00000001; Number of Byte to send=8; Data=0x123456789A9B9C9D.