4 modbus server operation, 1 modbus register organization, Modbus register organization – Contemporary Control Systems BASremote User Manual (firmware 3.1.x) User Manual
Page 61
TD040300-0MF
61
7.4 Modbus Server Operation
The BAS Remote Master functions as a Modbus TCP server accepting commands
from a Modbus TCP client through reserved port 502. As a Modbus TCP server, the
BAS Remote Master and its attached Expansion modules appear as Modbus serial
devices with each module assigned a unique Modbus device address from 1 through 4
with addresses 8 and 9 reserved for the Master. In a similar fashion, third-party Modbus
serial devices can be attached to the BAS Remote Master
’s MB port allowing these
devices the ability to be accessed by a Modbus TCP client. All attached serial devices
must be assigned unique valid Modbus addresses that do not conflict with those
assigned to the BAS Remote modules.
From a Modbus serial point-of-view, the BAS Remote is the Modbus master within the
system, but it actually functions as a proxy to Modbus TCP clients. Since the BAS
Remote Master has its own I/O points, it functions as both the Modbus master and
Modbus slave. All BAS Remote Expansion modules function as Modbus slaves as do
devices attached to the BAS Remote Master
’s MB Expansion port. Enabling the BAS
Remote Master to function as a Modbus TCP server does not preclude the BAS
Remote Master and its Expansion modules to simultaneously function as BACnet
devices.
The easiest way to understand Modbus server operation is to consider the BAS
Remote Master as also functioning as the Modbus master for attached Modbus slaves.
As a master, it does not require a Modbus address. Only Modbus slaves have
addresses. The BAS Remote Master, receives requests from one or more Modbus
TCP clients attached to the Ethernet network. The BAS Remote Master receives these
requests and sends them to the attached Modbus slave devices as commands. From
the Modbus slave’s point-of-view, these commands came from the BAS Remote
Master, and the slave is unaware that a Modbus TCP server even exists.
The BAS Remote Master also has some I/O points that are considered Modbus slave
points at Modbus address 1. Each of the attached BAS Remote Expansion modules
require a single Modbus slave address. If a Modbus command is addressed to any of
the BAS Remote modules, it is sent to the appropriate module for execution. If the
address is outside the range of BAS Remote module addresses, the command is then
sent to the MB port assuming that the intended Modbus slave is connected to this serial
Expansion bus. The command is unmodified as it passes through the BAS Remote
Master. If there is no response from the slave, the BAS Remote Master will send a
GATEWAY_TIMEOUT message to the Modbus TCP client. It should be remembered
that the BAS Remote Master utilizes slave addresses 8 and 9 for internal functions and
should not be used by any attached Modbus serial devices.
7.4.1 Modbus Register Organization
While the Modbus Data model consists of four types
– discrete input, coils, input
registers and holding registers, the BAS Remote I/O points appear as holding registers
with four holding registers assigned to each channel beginning with register location
40001. For each point there is status, two inputs, and one output register. There are
eight points of I/O per module, and the register locations are the same in both the
Master and Expansion modules. It is the Modbus device address that distinguishes
points on one module versus another. Holding registers represent 16-bit read/write