Rs485 Link-Layer Packet And Command Packet; Rs485 Link-Layer Packet Fields - JDS Uniphase SKB Series User Manual

Fiberoptic switch module
Hide thumbs Also See for SKB Series:
Table of Contents

Advertisement

28
Operation and Control Instructions
packet validation). The RS485 protocol consists of two elements: the RS-485 link-layer communica-
tion packet and the master-slave acknowledge cycle.
The RS485 packet is composed of a number of bytes surrounding a data payload (Figure 6). The
data payload section of the RS485 packet holds exactly one standard command packet, as illus-
trated. The packet bytes are designated as shown in Table 8.
Table 8: RS485 Link-Layer Packet Fields
Packet Byte
Size (bits)
SOH
DEST
SRC
TYPE
LEN
CRC
The master-slave acknowledge cycle refers the process of indicating to the sender that an RS485
packet has been received intact and that more packets can be sent. This action is accomplished by
sending an RS485 ACK packet back to the sender. Once a valid RS485 packet is received, and the
CRC has been verified, another packet can be sent by the master. Therefore, successful reception of
the link-layer packet must be followed by an ACK response from the slave. If no ACK packet is
received following transmission of a data packet with a specified timeout period, the sender needs to
re-transmit the data packet. An ACK packet consists of a standard RS485 packet without a length
byte, any data payload bytes, or CRC bytes. The type byte is defined as an ACK (1). The ACK
packet is shown in Figure 7.
This ACK cycle is reversed when response data packets are sent from the SKB slave to the master.
In this case, the master is expected to acknowledge receipt of the link-layer packet by sending an
ACK packet back to the slave.
A timeout period of 500 ms is used by the SKB switch for all serial data transfers. Therefore the time
between subsequent bytes of a packet, or the time between data and ACK packets (being both sent
and received, is 500 ms.
Figure 6: RS485 Link-Layer Packet and Command Packet
Description
8
Start of header byte (0x81)
8
Destination address of the packet (0x00 reserved for master, 0xFF
reserved for broadcast)
8
Source address (for sending ACK's and responses)
8
Packet type (DATA = 0, ACK = 1)
16
Length of payload section of the RS485 packet
16
16-bit CRC value with 0x1021 as polynomial
Figure 7: RS485 ACK Packet

Advertisement

Table of Contents
loading

Table of Contents