
9
2 Modbus Protocol Implementation
For detailed information on the Modbus protocol, message framing and error checking, refer
to the Modbus Protocol Reference Guide. It can be downloaded from the
Website. The following paragraphs outline some issues concerning the implementation of
the Modbus protocol in the PM174.
2.1 Transmission Modes
The PM174 can be set up to communicate on a serial Modbus network using either RTU, or
ASCII serial transmission mode, and via the Internet using Modbus/TCP mode. Refer to the
PM174 Installation and Operation Manual for information on selecting the transmission
mode in your meter.
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.
When communicating via the Internet, the address field is not checked and is returned in
the response message header.
2.3 Function Field
The Modbus functions implemented in the PM174 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
08
1
Loop-back test
Communications test
1
The PM174 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:
01 - Illegal function
02 - Illegal data address
03 - Illegal data value
04 - Device failure
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 PM174 Modbus registers are numbered in the range of 0 to 65535. From the Modbus
applications, the PM174 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.