User's Guide

47 of 146
13 Transmission Methods
13.1 UART transmission (RS232, RS422, RS485 or similar)
13.1.1 Physical Layer
A full or half-duplex connection such as RS232, RS422 or RS485 is used for the physical layer.
13.1.2 Data Link Layer
Transmission takes place in frames and blocks. A block comprises a maximum of 256 frames. A frame comprises a
maximum of 256 bytes, of which a maximum of 250 bytes can be user data. The result is a maximum block size of
64000 bytes of user data.
The data link layer is used to safeguard the data between the sender and recipient. The sender receives a response
from the recipient for each correct frame received. If the sender does not receive a response from the recipient within
a time window of 350 milliseconds after sending a frame, the frame sent is repeated until the error counter signals the
cancellation of the transmission.
Frame Structure
5A LL SS FF DD ... DD P1 P2
5A start code for synchronisation
LL number of bytes in the frame, not including the start code
SS status byte
FF frame number
DD user data
P1 16-bit checksum, low-byte
P2 16-bit checksum, high-byte
Start Code and Synchronisation
The start code is used to synchronise the recipient to the sender. Furthermore, the recipient synchronises to the start of
a frame when no data have been received for 100 milliseconds.
Status Byte
The status byte has the following meaning:
50 data packet
A0 response
OK
LL response
Memory error
(the recipient was unable to allocate any memory for the received data block)
A response is only 3 bytes long and is not CRC-checked.
OK 5A 02 A0
Memory error 5A 02 A1
Frame Number
The frame number shows how many more frames belong to this data block. Only the rst frame in a data block can be
shorter than 256 bytes. Each additional frame must have a length of 256 bytes (length byte LL is FF).
Therefore, it is possible to calculate the block size from the rst frame number, see the example below.