E300 Design Guide
479
Issue Number: 1
11 CT MODBUS RTU
This section describes the adaptation of the MODBUS RTU protocol
offered on Control Techniques' products. The portable software class
which implements this protocol is also defined.
MODBUS RTU is a master slave system with half-duplex message
exchange. The Control Techniques (CT) implementation supports the
core function codes to read and write registers. A scheme to map
between MODBUS registers and CT parameters is defined. The CT
implementation also defines a 32 bit extension to the standard 16 bit
register data format.
Figure 11-1 Architecture of MODBUS RTU
11.1 MODBUS RTU
Physical layer
RTU framing
The frame has the following basic format:
Figure 11-2 MODBUS RTU format
The frame is terminated with a minimum silent period of 3.5 character
times (for example, at 19200 baud the minimum silent period is 2 ms).
Nodes use the terminating silence period to detect the end of frame and
begin frame processing. All frames must therefore be transmitted as a
continuous stream without any gaps greater or equal to the silence
period. If an erroneous gap is inserted then receiving nodes may start
frame processing early in which case the CRC will fail and the frame will
be discarded. See description of
Silent Period
(
M05
) in section
MODBUS RTU is a master slave system. All master requests, except
broadcast requests, will lead to a response from an individual slave. The
slave will respond (i.e. start transmitting the response) within the quoted
maximum slave response time (this time is quoted in the data sheet for
all drive products). The minimum slave response time is also quoted but
will never be less than the minimum silent period defined by 3.5
character times.
If the master request was a broadcast request then the master may
transmit a new request once the maximum slave response time has
expired.
The master must implement a message time out to handle transmission
errors. This time out period must be set to the maximum slave response
time + transmission time for the response.
Figure 11-3 MODBUS RTU timing
11.2 Slave address
The first byte of the frame is the slave node address. Valid slave node
addresses are 1 through 247 decimal. In the master request this byte
indicates the target slave node; in the slave response this byte indicates
the address of the slave sending the response.
Global addressing
Address zero addresses all slave nodes on the network. Slave nodes
suppress the response messages for broadcast requests.
11.3 MODBUS registers
The MODBUS register address range is 16 bit (65536 registers) which at
the protocol level is represented by indexes 0 through 65535.
PLC registers
Modicon PLCs typically define 4 register 'files' each containing 65536
registers. Traditionally, the registers are referenced 1 through 65536
rather than 0 through 65535. The register address is therefore
decremented on the master device before passing to the protocol.
The register file type code is NOT transmitted by MODBUS and all
register files can be considered to map onto a single register address
space. All parameters in the drive are holding registers.
Attribute
Description
Normal physical layer for
multi-drop operation
RS285 2-wire
Bit stream
Standard UART asynchronous symbols
with Non Return to Zero (NRZ)
Symbol
Each symbol consists of:-
1 start bit
8 data bits (transmitted least significant bit
first)
2 stop bits
Baudrates
300, 600, 1200, 2400, 4800, 9600, 19200,
38400, 57600, 76800, 115200
Physical layer
UART
RTU framing
Parameter
Database
MODBUS RTU
CMP
X.Y
MODBUS PDU
Function code and data bytes
16bit CRC
Silent
interval
SLAVE
ADDRESS
File type
Description
1
Read only bits
2
Read / write bits
3
Read only 16 bit register
4
Read / write 16 bit register
Master request
Time
Frame detect
Slave frame
processing
Slave response
Slave response time
Master request
New master
request can
start here
Minimum silence
period
Minimum silence
period
Summary of Contents for 03200106
Page 490: ...0479 0024 01 ...