GE Multilin
745 Transformer Management Relay
7-3
7 COMMUNICATIONS
7.2 MODBUS PROTOCOL
7
7.2.5 DATA PACKET FORMAT
A complete request/response sequence consists of the following bytes transmitted as separate data frames:
A message is terminated when no data is received for a period of 3½ character transmission times. Consequently, the
transmitting device must not allow gaps between bytes larger than this interval (about 3 ms at 9600 baud).
•
SLAVE ADDRESS
: This is the first byte of every message. This byte represents the user-assigned address of the
slave device that is to receive the message sent by the master. Each slave device must be assigned a unique address,
and only the addressed slave will respond to a message that starts with its address. In a master query message the
Slave Address represents the address of the slave to which the request is being sent. In a slave response message
the Slave Address is a confirmation representing the address of the slave that is sending the response. A master query
message with a Slave Address of 0 indicates a broadcast command. All slaves on the communication link will take
action based on the message, but none will respond to the master. Broadcast mode is only recognized when associ-
ated with Function Codes 05h, 06h, and 10h. For any other function code, a message with broadcast mode slave
address 0 will be ignored.
•
FUNCTION CODE
: This is the second byte of every message. Modbus defines function codes of 1 to 127. The GE
Multilin 745 implements some of these functions. In a master query message the Function Code tells the slave what
action to perform. In a slave response message, if the Function Code sent from the slave is the same as the Function
Code sent from the master then the slave performed the function as requested. If the high order bit of the Function
Code sent from the slave is a 1 (i.e. if the Function Code is
>
7Fh) then the slave did not perform the function as
requested and is sending an error or exception response.
•
DATA
: This will be a variable number of bytes depending on the Function Code. This may include actual values, set-
points, or addresses sent by the master to the slave or by the slave to the master.
•
CRC
: This is a two byte error checking code. The RTU version of Modbus includes a two byte CRC-16 (16 bit cyclic
redundancy check) with every message. The CRC-16 algorithm essentially treats the entire data stream (data bits
only; start, stop and parity ignored) as one continuous binary number. This number is first shifted left 16 bits and then
divided by a characteristic polynomial (11000000000000101B). The 16 bit remainder of the division is appended to the
end of the message, MSByte first. The resulting message including CRC, when divided by the same polynomial at the
receiver will give a zero remainder if no transmission errors have occurred. If a GE Multilin Modbus slave device
receives a message in which an error is indicated by the CRC-16 calculation, the slave device will not respond to the
message. A CRC-16 error indicates that one or more bytes of the message were received incorrectly and thus the
entire message should be ignored in order to avoid the slave device performing any incorrect operation. The CRC-16
calculation is an industry standard method used for error detection.
MASTER QUERY MESSAGE:
SLAVE ADDRESS:
(1 byte)
FUNCTION CODE:
(1 byte)
DATA:
(variable number of bytes depending on FUNCTION CODE)
CRC:
(2 bytes)
SLAVE RESPONSE MESSAGE:
SLAVE ADDRESS:
(1 byte)
FUNCTION CODE:
(1 byte)
DATA:
(variable number of bytes depending on FUNCTION CODE)
CRC:
(2 bytes)