Chapter 8: modbus tcp slave protocol, 1 modbus overview, Modbus overview – Horner APG XL4 OCS HE-ETN300 User Manual

Page 59

Advertising
background image

SUP0740-07

CH.8

11/30/2009

Page 59 of 98

# 958

CHAPTER 8: MODBUS TCP SLAVE PROTOCOL

8.1 Modbus

Overview


Modbus TCP is a Master / Slave protocol, which allows a remote Modbus TCP Master (client) to
request services from a Modbus TCP Slave (server). In this context, the Ethernet Module acts as
a Modbus TCP Slave, which responds to requests from one or more Modbus TCP Masters.

All Modbus requests that contain the Ethernet Module’s IP Address are serviced. The master
needs to be configured with the Ethernet Module’s IP Address, and most masters also require the
slave unit number. Since each Ethernet Module must have its own unique IP Address, the slave
unit number is not relevant and is discarded by the Ethernet Module.

To access OCS registers, a Modbus TCP Master must be configured with the appropriate register
type and offset. This is usually accomplished with one of two methods:

The first method uses either Traditional Modbus References or Expanded Modbus
References
, in which the high digit represents the register type and the lower digits represent the
register offset (starting with register 1 for each type). Since only four Modbus register types (0, 1,
3 and 4) can be represented in this manner, the Ethernet Module’s Modbus implementation packs
several OCS register types into each Modbus register type. Starting addresses of each OCS
register type are shown in the Traditional Modbus Reference and Expanded Modbus
Reference
columns of Table 8.1.

The second method requires the Modbus TCP Master to be configured with a specific Modbus
Command and Offset
. The supported Modbus commands and the associated offsets are also
illustrated in Table 8.1.

Table 8.1 - Modbus Master Mapping

OCS

Reference

Maximum

Range

Traditional

Modbus

Reference

Expanded

Modbus

Reference

Modbus

Command(s)

Modbus

Offset

%Q1 2048 00001 000001

00000

%M1 2048 03001 003001

03000

%T1 2048 06001

006001

06000

%QG1 256 09001 009001

Read Coil Status (1)

Force Single Coil (5)

Force Multiple Coils (15)

09000

%I1 2048 10001

100001

00000

%IG1 256 13001

103001

03000

%S1 256 14001

104001

04000

%K1 256 15001

105001

Read Input Status (2)

05000

%AI1 512 30001

300001

00000

%AIG1 32 33001

303001

03000

%SR1 32 34001

304001

Read Input Register (4)

04000

%AQ1 512 40001 400001

00000

¾

%R1 2048 43001 403001

03000

%AQG1 32 46001 406001

06000

™ %R1

9999

-

410001

Read Holding Registers (3)

Preset Single Register (6)

Preset Multiple Registers (16)

10000


¾ All Ethernet modules support legacy register accessing (%R1-2048).
™ Only ETN300 modules support extended register accessing (%R1-9999).

Advertising
This manual is related to the following products: