Plc Device Addressing - Xytronix Research & Design CONTROL BY WEB XW-111 User Manual

Wireless digital input monitor
Table of Contents

Advertisement

XW-111™ Wi-Fi Digital Sensor Users Manual

5.2 PLC Device Addressing

There are generally two schemes for accessing Modbus devices. The first is by specifying the Modbus
function code, memory type, and address. The second, sometimes called PLC addressing, requires only
the address.
Modbus protocol uses four different address ranges for discrete inputs, coils, input registers, and holding
registers. The function code determines the address range of the message. The following are common
function codes and their respective address ranges.
Code Name
Holding Registers (Read only) 03
Discrete Inputs (Read only)
* 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 XW-111 feature address and add to it the address offset in the PLC address mode column.
Input Address + PLC Base Address = PLC Address
For example, to read discrete Input 2
Input Address
PLC Base address
PLC Address
Programming the PLC to read from 1002 will return the value of Input 2.
Code Name
Read Holding
Registers
Read Discrete Inputs 02
For 32-bit numbers or floats, two registers must be read starting at the desired address, examples of
each are given for the applicable functions.
Xytronix Research & Design, Inc.
Modbus
Function
02
1
1001
1002
Modbus
XW-111 Addresses
Function
03
16 (Battery Voltage)
0-1 (Inputs 1-2)
Data Type*
PLC Address
Mode 485
32 bits
4001-5000
Discrete
1001-2000
Data Type PLC Address
32-bit float Addr + 4001
Discrete
Modbus/TCP
PLC Address
Mode 584/984
40001-50000
10001-20000
PLC Address
Mode 485
Mode 584/984
Addr + 40001
Addr + 1001
Addr + 10001
Page 35

Advertisement

Table of Contents
loading

This manual is also suitable for:

Control by web xw-111b

Table of Contents