
Page 65
MODBUS RTU PROTOCOL
The addresses listed in the tables follow the standard addressing specified in the reference guide of the
Modicom PI-MBUS-300 below that is an extract that helps the user to communicate with the instrument.o.
“All data addresses in Modbus messages are referenced to zero. The first occurrence of a data item is
addressed as item number zero. For example:
The coil known as ‘coil 1’ in a programmable controller is addressed as coil 0000 in the data
address field of a Modbus message.
Coil 127 decimal is addressed as coil 007E hex (126 decimal).
Holding register 40001 is addressed as register 0000 in the data address field of the message. The
function code field already specifies a ‘holding register’ operation. Therefore the ‘4XXXX’ reference
is implicit.”
To confirm the entry of a new value in E
2
prom, execute the MAKE - BACKUP function. If this function is
not run, by turning off the MCT 1302, the value before the change will be restored.
Unless otherwise specified, numerical values (such as addresses, codes and data) are expressed as
decimal values.
The MODBUS RTU protocol is only available on COM2 RS485.
HANDLING OF COMMUNICATION ERRORS
The communication strings are controlled by CRC (Cyclical Redundancy Check). In the event of a commu-
nication error, the slave does not respond with any string. The master must consider a timeout to receive
the response. If it does not get an answer, it must deduce that a communication error has occurred.
HANDLING OF DATA ERRORS RECEIVED
In the case of a string is received correctly but is not executable, the slave responds with an EXCEPTION
RESPONSE as shown in the following table.
CODE
DESCRIPTION
1
ILLEGAL FUNCTION (The function is not valid or is not supported)
2
ILLEGAL DATA ADDRESS (The specified data address is not available)
3
ILLEGAL DATA VALUE (Data received is invalid)
SUPPORTED FUNCTIONS:
FUNCTION
DESCRIPTION
01
READ COIL STATUS (Reading of the logic output status)
02
READ INPUT STATUS (Reading of the logic input status)
03
READ HOLDING REGISTERS (Reading of programmable registers)
04
READ INPUT REGISTERS (Reading of “read only” registers)
05
FORCE SINGLE COIL (Writing of the single output status)
06
PRESET SINGLE REGISTER (Writing of a programmable register)
15
FORCE MULTIPLE COILS (Multiple writing of outputs)
16
PRESET MULTIPLE REGISTERS (Multiple writing of registers)
Funct + 80h EXCEPTION RESPONSE