Академический Документы
Профессиональный Документы
Культура Документы
Part 2 : Definitions
Schneider documents
WEB sites
Modbus.org :
http://www.modbus.org
Modicon site for Modbus users.
Transparent Factory :
http://www.transparentfactory.com
Schneider Electric site for Transparent Factory users.
Modbus Plus :
http://www.modicon.com/techpubs/toc6.html
Modbus Plus Planning and installation.
Modbus protocol
7 Application Modbus
6 Presentation
5 Session
4 Transport
3 Network
Modbus TCP/IP
7 Application Modbus
6 Préeentation
5 Session
4 Transport TCP
3 Network IP
2 Link CSMA / CD
ETHERNET V2 ou 802.3
1 Physical
Modbus Plus
7 Application Modbus
6 Presentation
5 Session
4 Transport
3 Network
The main advantage of the RTU mode is that it achieves higher throughput.
The Modbus frame structure is the same for requests (master to slave
messages) and responses (slave to master messages).
Modbus RTU
Modbus ASCII
Address field
Valid slave device addresses are in the range of 0 ... 247 decimal.
The individual slave devices are assigned addresses in the range of 1 ... 247.
Value 0 is reserved for broadcast messages (no response).
Request :
A master addresses a slave by placing the slave address in the address field of
the message.
Response :
When the slave sends its response, it places its own address in this address field
of the response to let the master know which slave is responding.
Function field
Request :
The function code field tells the slave what kind of action to perform.
Response :
For a normal response, the slave simply echoes the original function code.
Data field
Request :
The data field contains additional information which the slave must use to take
the action defined by the function code. This can include items like register
addresses, quantity of items to be handled, etc...
Response :
If no error occurs, the data field contains the data requested.
If an error occurs, the field contains an exception code that the master
application can use to determine the next action to be taken.
P&T - GPS - Training Section 6 - Slide 12 / 27
PhW - 06_TECH_Modbus_en 06/ 2004
Part 3 : Modbus frame description
Checksum field
Request :
The checksum is calculated by the master and sends to the slave.
Response :
The checksum is re-calculated by the slave and compared to the value sent
by the master.
If a difference is detected, the slave will not construct a response to the master.
P&T - GPS - Training Section 6 - Slide 13 / 27
PhW - 06_TECH_Modbus_en 06/ 2004
Part 3 : Modbus frame description
Request :
Response :
Request :
Response :
Request :
Response :
Code Function
Parity checking
Even or odd can be optionally applied to each character.
Frame checking
LRC or CRC is applied to the entire message.
Continuous stream
The entire message frame must be transmitted as a continuous stream.
If a silent interval (more than 1.5 character times RTU mode or 1 second ASCII mode) occurs
before completion of the frame, the receiving device flushes the incomplete message and
assumes that the next byte will be the address field of a new message.
This interval is set to be long enough for any slave to respond normally.
If the slave detects a transmission error, the message will not be acted upon.
The slave will not construct a response to the master.
Thus the timeout will expire and allow the master's program to handle the error.
polarisation
line terminator
distribution of a reference potential
number of slaves
length of the bus
Uni-Telway
Jbus
5V
Master 650
650
D1
120 120
1 nF 1 nF
D0
Common
Slave 1 Slave 2
5V
Master 4,7 K
4,7 K
D(B)
120 120
1 nF D(A) 1 nF
0 VL
5V 5V
Slave 1 Slave 2
5V
Master
470
470
L-(B/B ’)
150 150
L+(A/A ’)
Slave 1 Slave 2
Rp
120 D1
120
1 nF D0 1 nF
Common