MODBUS serial : Telegram structure MODBUS RTU-mode

 

The LIAN 98 manual can and may not contain the complete MODBUS documentation, caused by legal position. Only all knowledge that is essential necessary for the LIAN 98 software operation is specified in parts in this manual.

Detailed information to the protocol you will find in the MODBUS documentation
on the webpage of the "Modbus Organization"
<Modbus Specifications and Implementation Guides>

 

Telegram format

 

Control- and monitoring direction

 

 

ADU : Application Data Unit
PDU : Protocol Data Unit

 

Error message : Monitoring direction only ( slave to the master )

 

 

Slave address :

The serial MODBUS protocol is a master - slave protocol. Only one master is connected with one or more slaves ( maximum 247 ) to the same serial bus. The master itself has no specific address. Only the slaves must have an unambiguous address at this bus. The master interrogates a particular slave directly by prefixing the address of this slave to a PDU. Alike, the slave sends its address in the response to the master to indicate the sender of the message.

 

Function code :

Standard function codes used on MODBUS application layer protocol are described in details in the documentation
"MODBUS Application Protocol Specification" on the webpage of the "Modbus Organization".

 

Code Function Explaination
1 Read Coils Single bit indication ( read/ write possible )
2 Read Discrete Inputs Single bit indication ( read only )
3 Read Holding Registers 16 bit analogue value ( read/ write possible )
4 Read Input Registers 16 bit analogue value ( read only )
5 Write Single Coils e.g. single bit command
6 Write Single Register e.g. 16 bit analogue value/ bit pattern
7 Read Exception Status only serial line
8 Diagnostics only serial line
     
11 Get Comm Event Counter only serial line
12 Get Comm Event Log only serial line
     
15 Write Multiple Coils e.g. single bit command
16 Write Multiple Register e.g. 16 bit analogue value/ bit pattern
17 Report Slave ID only serial line
     
20 Read File Record  
21 Write File Record  
22 Mask Write Register  
23 Read/ Write Multiple Register e.g. 16 bit analogue value/ bit pattern
24 Read FIFO Queue  
     
43 Encapsulated Interface Transport  
     

 

Exception code :

The function code of an exception response correlates to the function code of the request plus 128. The exception code is provided to indicate the reason of the error and is described in the documentation "MODBUS Application Protocol Specification - Function codes descriptions" on the webpage of the "Modbus Organization".

 

Checksum :

The RTU mode includes an error–checking field at the end of the message that is based on a Cyclical Redundancy Checking ( CRC ) method performed on the message contents. The CRC field contains a 16–bit value appended as two 8–bit bytes. The CRC value is calculated by the sending device, which appends the low–order byte of the field first, followed by the high–order byte. The receiving device recalculates a CRC during receipt of the message, and compares the calculated value to the actual value it received in the CRC field. If the two values are not equal, an error results.

 

 


MAYR Software

Wuerzburger Ring 39,  D 91056 Erlangen

Manual LIAN 98


LIAN 98 Protocol Router, Simulator and Analyzer
© Copyright 2001, 2006, 2011 by Werner Mayr. All Rights reserved.