Specifications
59
Schneider Electric
The Modbus Protocol (continued)
Each frame includes four types of information:
b Slave number (1 byte):
v the slave number specifies the destination slave (1 to 255). If this number is zero,
the query is addressed to all slaves and there is no response message.
b Function code (1 byte):
v can be used to select a command (read, write, bit, word) and to verify if the
response is correct.
b Information field (n bytes):
v contains the parameters associated with the function: bit address, word address,
bit value, word value, number of bits, number of words.
b Control word (2 bytes):
v is used to detect transmission errors.
Diagram showing how the transmission medium is filled
Note: The lengths of QUERY, RESPONSE, BROADCAST, WAIT and
PROCESSING depend on the function performed.
All exchanges except broadcasting include
two frames: a query from the master and a
response from the slave.
Broadcast exchanges (write only) consist of
only one frame from the master.
E52351
Analysis of the response
and preparation of
the next exchange
Wait
Response
Master
Slave N°1
Slave N°n
Physical
medium
Exchange i-1 Exchange i Exchange i+1
Time
Turnaround
time
Query
Broadcast
Execution by slave
D
D
R
R
R
R
D
D
R
R
D
D
Guide to Integration
Modbus / Jbus