EasyManua.ls Logo

Littelfuse MPS - Appendix C MPS Modbus Protocol

Littelfuse MPS
148 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Page C-1
MPS Motor Protection System Rev. 6-F-022117
Appendix C, MPS Modbus Protocol
APPENDIX C
MPS MODBUS PROTOCOL
C.1 PROTOCOL
The MPS implements the Modbus
®
RTU protocol as
described in the Gould Modbus Reference Guide,
Publication PI-MBUS-300 Rev. B.
The communications system consists of a single master
and up to thirty-two MPS-CTU slaves connected using a
2-wire RS-485 network. If the master does not have an RS-
485 port, an RS-232 to RS-485 converter is required. The
converter must have automatic send-data control (SD). SD
control does not require hand-shaking lines since it uses the
data line to control the transmit/receive line on the
RS-485 transceivers.
Only the master can initiate a message transaction.
Messages can be addressed to individual slaves or they can
be broadcast messages. Broadcast messages are executed
on the MPS slaves but unlike individually addressed
messages, the slaves do not generate a reply message.
C.2 MESSAGE SYNCHRONIZATION
Message synchronization is accomplished by detection of
an idle communication line. The communication line is
considered idle when no communication exists for an
equivalent delay of 3.5 characters.
The first byte received after idle-line detection is
interpreted as the address byte of the next message.
Message bytes must be transmitted in a continuous stream
until the complete message has been sent. If a delay of
more than 3.5 characters exists within the message, the
message is discarded.
Response messages from the MPS are delayed by at least
3.5 character delays.
C.3 ERROR CHECKING
Modbus RTU uses a 16-bit cyclic redundancy check
(CRC). The error check includes all of the message bytes,
starting with the first address byte.
When a CRC error is detected, the message is discarded
and there will be no response.
If the CRC check is correct but the internal data in the
message is not correct, the MPS will respond with an
exception response code.
Modicon Modbus
®
is a registered trademark of Schneider
Electric.
C.4 FUNCTION CODES SUPPORTED
The MPS Modbus Protocol supports the following
function codes:
Read Holding Registers (Function Code 3)
Read Input Registers (Function Code 4)
Write Single Register (Function Code 6)
Write Multiple Registers (Function Code 16)
Command Instruction (Function Code 5)
Function Codes 3 and 4 perform the same function in the
MPS.
Registers in Modbus start at 40001 decimal and the
register address generated for this register is 0.
C.4.1 APPLICATION LAYER
The hexadecimal system is used. Value representations
use the “C” convention. For hexadecimal, 0x precedes
the value.
C.4.2 READ INPUT/HOLDING REGISTERS (CODE 04/03)
The first byte of the read message is the slave address.
The second byte is the function code. Bytes three and four
indicate the starting register. The next two bytes specify the
number of 16-bit registers to read. The last two bytes
contain the CRC code for the message.
TABLE C.1 READ REGISTERS (CODE 04/03)
HEX BYTE
DESCRIPTION
Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
Slave Address
Function Code
MSB Register Address
LSB Register Address
MSB Number of Registers
LSB Number of Registers
LSB CRC
MSB CRC
The two-byte values of starting register and number of
registers to read are transmitted with the high-order byte
followed by the low-order byte.
The CRC value is sent with the LSB followed by the
MSB.
The following message will obtain the value of register 1
(Modbus 40002) from slave 1. Note that Modbus registers
are numbered from zero (40001 = zero, 40002 = one, etc.):
0x01 | 0x03 | 0x00 | 0x01 | 0x00 | 0x01 | 0xD5 | 0xCA

Table of Contents