Starting up the device - RS 485 Modbus interface
Leuze electronic GmbH + Co. KG
CML 730i
145
RS 485 Modbus protocol
The CML 700i with RS 485 Modbus interface communicates with Modbus protocol RTU (Remote Terminal
Unit).
For the RS 485 Modbus protocol configurations, the following applies: 1 module = 2 bytes.
General structure of a serial RS 485 Modbus protocol telegram:
Depending on the type of the RS 485 Modbus telegram (read access/write access or request/answer), all
components can be contained in this general telegram structure or just some of them.
Access via RS 485 Modbus telegrams:
• Read access (see chapter 14.2.1)
The master (PLC) sends the slave (CML 700i) a 16-bit read access request that prompts the slave to
send user data (e.g., measurement data and parameter values) as response telegram to the master.
• Write access (see chapter 14.2.2)
The master (PLC) sends a write-access command telegram (e.g., teach or reset) or write-access
configuration telegram (e.g., for cascading) for controlling the slave (CML 700i). The response from
the slave reflects the write access bit on the master, but without specifying the amount of user data
and the user data.
• Error check (CRC calculation) (see chapter 14.2.3)
The CRC calculation is a frame test and is performed over all bytes of the telegram to be transmitted,
including the slave address. The CRC bytes are appended to the end of the telegram.
14.2.1 Modbus read access
16-bit read access
Description of the bytes:
• Byte 1: 8-bit address, corresponds to the slave address set in the receiver control panel
• Byte 2: read access command = 0x03
• Byte 3: module ID = 0x00
• Byte 4: index (here, e.g., 0x10 returns the manufacturer name, see chapter 14.3)
• Bytes 5 … 6: maximum accepted number/length of the response data in words (16 bit)
• Bytes 7 … 8: 16-bit error check (Cyclic Redundancy Check, CRC) (see chapter 14.2.3)
Response to 16-bit read access (example)
During operation of the CML 700i on the RS 485 Modbus, all configuration parameters are set
with adjustment values ex works (see default adjustment values in the following module descrip
-
tions). As long as these configuration parameters are not changed, the CML 700i operates with
these default parameter values.
Address field
Function code
User data
Error check
Telegram frame:
01
03
00 10
00 10
72 03
(byte 1)
(byte 2)
(byte 3 … 4)
(byte 5 … 6)
(byte 7 … 8)
Telegram frame:
01
03
20
4C 65 75 7A 65 20 65 6C 65 63 74 72 6F 6E 69
63 20 47 6D 62 48 20 2B 20 43 6F 2E 20 4B 47
00 00
40 E6
(byte 1) (byte 2) (byte 3) (byte 4 … 35)
(byte 36 … 37)