57
XYR400E Ethernet Modem
Version 1
5/1/08
An example of the Modbus functionality of the XYR 400E is illustrated below. In this example the
status of the onboard digital input at C will be reflected at the onboard digital output at B. Also, 8
I/O registers from Modbus serial device D will be transferred to A.
The Modbus configuration for unit C is shown below. Unit C is configured with Modbus TCP
Server enabled and Device ID = 1, so that the Modbus TCP Client at B can connect and read the
status of the onboard digital input. Unit C also has Modbus TCP to RTU Gateway enabled (see
section “3.13.3 Modbus TCP to RTU Gateway”) so that the Modbus TCP Client at B can
communicate with the serial Modbus RTU device D.
The configuration of unit B is shown below (accessible via the “I/O Transfer” configuration page).
It can be seen that Modbus TCP Client has been enabled with a 500msec scan rate, meaning that
there will be a 500msec delay between each of the
mappings
directed at any server. The “Reset
Registers on Comms Fail” option is enabled with a timeout of 60 seconds, indicating that any of the
registers at unit B will be reset if a successful Modbus transaction involving that register has not
been executed in the last 60 seconds. The Modbus TCP to RTU Gateway at B must also be enabled
(see section “3.13.3 Modbus TCP to RTU Gateway”) to allow Modbus communications with the
serial device A.
Three “Modbus TCP Client Mappings” are also configured at B in order to perform the required I/O
transfer. The first mapping transfers the status of the onboard digital input at C to the onboard
digital output at B.
Local Register
4320 specifies the register for the onboard digital output at B
(since B is the
local
unit at which the mapping is configured).
I/O Count
1 specifies that only one
I/O point is being transferred (i.e. the single digital I/O).
Function Code
02: Read Discretes specifies
the standard Modbus function code to read discrete (i.e. digital) inputs.
Destination Register
4300
specifies the register for the onboard digital input at unit C (since C is the
destination
unit for this
mapping).
Device ID
1is the ID of the onboard Modbus TCP Server at C.
Server IP Address
Modbus
RTU Slave
Device ID 6
A
C
192.16 8.0.196
Modbus TCP
Client
192 .168.0.200
Modb us TCP
Server
Device ID 1
D
B
Modbus
RTU Slave
Device ID 5