Weidmuller WI-MOD-945-E: 900Mhz Wireless Ethernet & Device Server v2.16 User Manual

Page 49

Advertising
background image

Weidmuller Wireless Ethernet Modem & Device Server WI-MOD-945-E User Manual

Page 49

www.weidmuller.com

Rev 2.136

The WI-MOD-945-E provides a configurable option to automatically reset the value of the onboard I/O registers to zero in
the event of a communications failure. If a valid Modbus transaction directed to/from a given register has not been
completed for longer than a configurable timeout, then the value of that register will be reset to zero.

An example of the Modbus functionality of the WI-MOD-945-E 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 single bit registers from Modbus serial
device D will be transferred to A.

Unit B is configured with Modbus TCP Server enabled and Device ID = 1, Unit C is configured as shown above.

The first will write the register 4300 (Local Digital Input) to server IP address 192.168.0.200 (Unit B), Device ID
#1, register 4320 (Local Digital output).

The second mapping shows a Modbus read command of 8 Discretes starting at register 1 (Destination Reg) on
Device ID #6 connected to IP address 192.168.0.123 (it self) and store the values at register #1 locally.

The third mapping shows the Modbus write command (Write Coils) which is writin

g the local 8 I/O’s starting at

register 1 across to Server IP address 192.168.0.200, Device ID #5, destination reg #1.

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.11 -

RS-232 / RS485 Modbus TCP/RTU Converter” 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 192.168.0.200 is the IP address of unit C

– which is the Modbus

TCP Server we are reading from. Response Timeout 1000 ms specifies that unit C must respond to this message within
1000ms. Comm Fail Register 0 specifies the local register where the communications status for this mapping will be
stored.

The second mapping reads 8 registers from serial unit D into onboard registers in unit B. Note that in this case the
specified Device ID 6 is the Modbus Address of the serial device D, while the Server IP Address 192.168.0.200 is the IP
Address of unit C since the Modbus TCP to RTU Gateway at unit C converts the Modbus TCP message to Modbus RTU
and routes it out the serial port to unit D.

Figure 30 - Modbus Mappings

Advertising