4-1
IM XL100C-E
1
2
3
4
5
6
7
App
Index
Modbus Protocol
4.1
Modbus Protocol Specifications and Function
Codes
The Modbus protocol can be used only on the serial interface (RS-232 or RS-485).
Modbus Specifications
The Modbus specifications of the XL100 are as follows:
Specifications
Description
Transmission media
RS-232 or RS-485
Baud rate
Select 2400, 4800, 9600, 19200, 38400, 57600, or 115200 bps (57600
and 115200 are selectable only on the RS-485)
Start bit
Fixed to 1 bit
Stop bit
Select 1 or 2 bits
Parity
Select Odd, Even, or None (no parity).
Transmission mode
RTU (Remote Terminal Unit) mode or ASCII mode
Data length
RTU mode: 8 bits. ASCII mode: Select 7 or 8 bits
Error detection
RTU mode: Uses error detection CRC-16. ASCII mode: Uses LRC
Data interval
RTU mode: Determines message termination with a time interval
equal to 3.5 characters or more.
ASCII mode: Indicates message termination with CR+LF.
Slave address
RS-232: 1 to 247
RS-485: 1 to 247
Function Codes of the Modbus Protocol
The function codes of Modbus protocol that the XL100 supports are listed below.
Slave Function
The slave function of the XL100 does not support broadcast commands.
Function
Function
Operation
Code
3
Read the hold register (4xxxx)
The master device can read the communication
input data written using function codes 6 and 16.
4
Read the input register (3xxxx)
The master device loads the calculated,
measured, and time data of the XL100.
6
Single write to hold register (4xxxx) The master device writes to the communication
input data of the XL100.
8
Loopback test
The master device performs a loopback test of
the XL100. The XL100 only supports message
return (test code 0x00*).
16
Write to the hold register (4xxxx)
The master device writes to the communication
input data of the XL100.
* Hexadecimal 00.
Master Function
Function
Function
Operation
Code
3
Read the hold register
Read the hold register data of another device into
(4xxxx and 4xxxxx)
communication input data (Cxx).
4
Read the input register
Read the input register data of another
(3xxxx and 3xxxxx)
device into communication input data (Cxx).
Chapter 4 Modbus Protocol