![Weidmuller WI-GTWY-9 Скачать руководство пользователя страница 71](http://html1.mh-extra.com/html/weidmuller-0/wi-gtwy-9/wi-gtwy-9_user-manual_952403071.webp)
WI-GTWY-9-xxx Wireless Gateway V1.18
71
The value of a discrete (digital) I/O point is stored in the WI-GTWY-9-xxx database as a
hexadecimal '0000' (“off”) or hex 'FFFF' (“on”). However the WI-GTWY-9-xxx will respond
with either a ‘0’ (“off”) or ‘1’ (“on”) to a digital read command from the Modbus master - these are
commands 01 and 02. Similarly, the WI-GTWY-9-xxx will accept ‘0’ or ‘1’ from the Modbus
master in a digital write command and store ‘0000’ or ‘FFFF’ in the database location - these
commands are 05 and 15.
The Modbus function codes that the WI-GTWY-9-xxx will respond to are shown in the table
below.
Supported Modbus Function Codes:
Function
Code
Meaning
01
Read the state of multiple digital output points
02
Read the state of multiple digital input points
03
Read the value of multiple output registers
04
Read the value of multiple input registers
05
Set a single digital output ON or OFF
06
Set the value of a single output register
07
Read Exception Status - compatibility - returns zero
08
Loopback test
Supported codes 0 return query data
10 clear diagnostic counters
11 bus message count
12 CRC error count
14 slave message count
15
Set multiple digital output points ON or OFF
16
Set multiple output registers
Analog I/O are 16 bit register values. A value of decimal 8192 (hex 2000) represents 0mA. A value
of 49152 (hex C000) represents 20mA. Each 1 mA has a value of 2048 (hex 0800) - a change of
4096 (hex 1000) is equivalent to a change of 2mA. A 4-20mA signal will vary between 16384 (hex
4000) and 49152 (hex C000). A 0-20mA signal will vary between 8192 (hex 2000) and 49152 (hex
C000).
Pulse counts are stored as a 16-bit register. When the register rolls over, from ‘FFFF’ (hex), the
next value will be ‘0001’. The register will only have a value of ‘0000’ when the remote module
starts up, and the previous count is lost. This value will indicate that the counter has reset.
Modbus Errors
Four Modbus error messages are reported to the Modbus Master. An error response is indicated
by the address of the return message being 128 plus the original slave address.