
Ethernet TCP/IP interface
Leuze electronic
AMS 308
i
59
TNT
35/7-2
4
V
9.4
Communication protocol (Leuze binary protocol via TCP/IP)
The Leuze binary protocol is integrated in the user data area within the TCP/IP or UDP
communication.
9.4.1
Query telegram on the AMS 308
i
TCP user data area
The Leuze binary protocol has a proprietary header. This is an integral part of the user data
and has the following functions:
• Transaction ID
The transaction ID enables the unique assignment of a query telegram to the AMS 308
i
to its answer.
A transaction ID is entered into the query telegram; this ID is also used in the answer
telegram. By simply increasing the transaction ID, continuous processing, for example,
can be ensured.
• Protocol ID
The identifier (0x4C31) is defined as the protocol ID for the AMS 308
i
binary protocol.
The protocol ID remains unchanged for the binary protocol.
• Length
The number of the following user data bytes is entered. The TCP user data area is 2
bytes long in the case of a query telegram, and 6 or 8 bytes long in the answer telegram,
depending on the command.
• 0xFF
Reserve byte with entry 0xFF.
Function code
Via the function code, the functions on the AMS 308
i
described in the table below can be
activated.
ETHERNET HEADER
(Ethernet addresses)
IP HEADER
(IP addresses)
TCP HEADER
(Port numbers)
TCP USER DATA AREA
FCS
Transaction ID
(16Bit)
Protocol ID
(16Bit)
Length
(16Bit)
0xFF
(8Bit)
Function code
(8Bit)
Byte value
Function
Hex
Dec
0xF1
241
Transfer single position value
0xF2
242
Start cyclical transmission of the position value
0xF3
243
Stop cyclical transfer
0xF4
244
Laser on
0xF5
245
Laser off
Table 9.1:
Functions