6
2 Modbus Protocol Implementation
For detailed information about Modbus protocol, Modbus message framing and error checking, refer
to the "Modicon Modbus Protocol Reference Guide". It can be downloaded from the Modicon's Web
site at
www.modicon.com
. The following paragraphs outline some issues concerning the
implementation of the Modbus protocol in the ETC2002.
2.1 Transmission Modes
The ETC2002 can be set up to communicate on a Modbus network using ASCII or RTU transmission
mode. Refer to the "ETC2002 Installation and Operation Manual " on how to select the transmission
mode in your device.
2.2 Address Field
The address field contains a user assigned address of the instrument (1-247) on a Modbus network.
Broadcast mode using address 0 is not supported.
2.3 Function Field
The Modbus functions implemented in the ETC2002 are shown in Table 2-1. Function 04 can be used
in the same context as function 03.
Table 2-1 Modbus Function Codes
Code (decimal)
Meaning in Modbus
Action
03
Read holding registers
Read multiple registers
04
Read input registers
Read multiple registers
06
Preset single register
Write single register
16
Preset multiple registers
Write multiple registers
081
Loop-back test
Communications test
1
The ETC2002 supports only diagnostic code 0 - return query data.
2.4 Exception Responses
The instrument sends an exception response when an error is detected in the received message. To
indicate that the response is notification of an error, the high order bit of the function code is set to 1.
Implemented exception response codes:
1 - Illegal function
2 - Illegal data address
3 - Illegal data value
10 - Gateway is busy. Remote access is temporarily unavailable.
When the character framing, parity, or redundancy check detects a communication error, processing of
the master's request stops. The instrument will not act on or respond to the message.
2.5 Modbus Register Addresses
The ETC2002 Modbus registers are numbered in the range of 0 to 65535. From the Modbus
applications, the ETC2002 Modbus registers can be accessed by simulating holding registers of the
Modicon 584, 884 or 984 Programmable Controller, using a 5-digit “4XXXX” or 6-digit “4XXXXX”
addressing scheme. To map the ETC2002 register address to the range of the Modbus holding
registers, add a value of 40001 to the ETC2002 register address. When a register address exceeds 9999,
use a 6-digit addressing scheme by adding 400001 to the ETC2002 register address.