Operation
WebRelay-10 Users Manual
Code Name
Modbus
Function
Data Type*
PLC Address
Mode 485
PLC Address
Mode 584/984
Coils (Read/Write)
01, 05, 15
Discrete
1-1000
1-10000
Discrete Inputs (Read only)
02
Discrete
1001-2000
10001-20000
Registers (Read only)
04
8-64 bits
3001-4000
30001-40000
Holding Registers
(Read/Write)
03, 06, 16
8-64 bits
4001-5000
40001-50000
* Data types may be implemented at the discretion of the manufacturer. Address ranges may also over
lap. Discrete is a binary or boolean value, 1 or 0.
Function codes, memory types, and addresses can be converted to the PLC addressing equivalent
using the table below. To use the table, look up the row corresponding to the Modbus function code.
Then take the desired WebRelay-10
TM
feature address and add to it the address offset in the PLC
address mode column.
{input address} + {PLC address range} = PLC address
For example, to read discrete Input 2, the Modbus function code 02 is used. Adding the address of Input
2, 1, to the address range, 1001, gives a PLC address of 1002. Programming the PLC to read from 1002
will return the value of Input 2.
Code Name
Modbus
Function
WebRelay Addresses Data Type PLC Address
Mode 485
PLC Address
Mode 584/984
Read Coils
01
0-9 (Relays 1-10)
Discrete
Addr + 1
Addr + 1
Read Discrete
Inputs*
02
0-1 (Inputs 1-2)
Discrete
Addr + 1001
Addr + 10001
Read Holding
Registers*
03
272-286 (Sensors 1-8)
32-bit
Addr + 4001
Addr + 40001
Write Coils
05
0-9 (Relays 1-10)
Discrete
Addr + 1
Addr + 1
Write Multiple Coils 15
0-9 (Relays 1-10)
Discrete
Addr + 1
Addr + 1
Write Multiple
Registers
16
0-9 (Relays 1-10)
32-bit
Addr + 1
Addr + 1
* WebRelay-10 Plus™ only
For 32-bit numbers, two registers must be read starting at the desired address, examples of each are
given for the applicable functions.
page 64
Xytronix Research & Design, Inc.