2 modbus function codes, 1 03 (0x03) read holding registers, 2 06 (0x06) write single register – Contemporary Control Systems BASremote User Manual (firmware 3.1.x) User Manual
Page 64: 3 16 (0x10) write multiple registers, 5 mapping modbus variables to bacnet/ip, 1 general mapping principles, 2 mapping scheme, Modbus function codes, Mapping modbus variables to bacnet/ip, General mapping principles

TD040300-0MF
64
7.4.2 Modbus Function Codes
There are many Modbus function codes but the BAS Remote only responds to three
which involve holding registers. These function codes are described below. If other
than one of these three function calls are received from the Modbus TCP client, an
ILLEGAL_FUNCTION error message is returned by the BAS Remote. The BAS
Remote Master does not monitor the function calls sent to the MB Expansion bus.
7.4.2.1
03 (0x03) Read Holding Registers
This function code is used to read the contents of a contiguous block of holding
registers within the BAS Remote Master or BAS Remote Expansion module.
7.4.2.2
06 (0x06) Write Single Register
This function code is used to write a single holding register to the BAS Remote Master
or BAS Remote Expansion module.
7.4.2.3
16 (0x10) Write Multiple Registers
This function code is used to write a block of contiguous registers (1 to 123 registers) to
a BAS Remote Master or BAS Remote Expansion module.
7.5 Mapping Modbus Variables to BACnet/IP
7.5.1 General Mapping Principles
The BAS Remote acts as a gateway between Modbus devices and BACnet/IP devices.
It is the master on the Modbus network and a server on the BACnet/IP network. It will
poll for specified Modbus variables (coils or registers) and will map these to specified
BACnet/IP objects.
Modbus addresses: When communication occurs between a Modbus TCP host and
the slaves devices attached to the BAS Remote, you can use all legal Modbus
addresses (except that 1
–9 are always reserved for the BAS Remote Master module).
Due to the large range of instance numbers in, BACnet, it was decided to have the BAS
Remote normally map the Modbus address/register or coil to a 22-bit BACnet instance
using the first 2 positions as the Modbus device address (10
–39) and the next 5 digits
as the Modbus register or coil number. For example, 1040001 will be device 10 and
register 40001. This gives a range of 1,000,001 to 3,949,999. The maximum number of
mapped Modbus variables is 1000.
7.5.2 Mapping Scheme
Each Modbus register is read and converted into a BACnet floating point value. Each
coil is converted to a binary value. All such values are readable and some are
writeable. A value is accessible in the present_value property of the object being
mapped. A present_value that is written will be passed to the Modbus device only if its
priority is sufficient to force a change.
Each Modbus variable maps to one BACnet object as follows:
Registers
Coils
Modbus Variable :
read/write
read-only
read/write
read-only
maps to
maps to
maps to
maps to
BACnet Object :
analog-output
analog-input
binary-output
binary-input