TReX User Manual v2.14 Firmware
Modbus
The TReX supports both RTU and TCP modbus protocol options. These are well established
and defined protocols used primarily in SCADA control and monitoring applications.
These Modbus protocols can be used over any of the RS232, RS422, RS485 and Ethernet
interfaces.
Baud-rates, IP configuration and Modbus specific configuration items are through:
MENU->PROTOCOL->MODBUS. This is an optional feature.
Note that the Modbus TCP protocol by default uses port 502. This is not a firm requirement,
and this can be changed to another port. The TReX defaults to port 5080.
Modbus RTU
The Modbus RTU protocol, as well as the TCP extension, are well documented in the
specifications which are available at
http://www.modbus.org
, a website established by the
Modbus Organization for supporting and organizing the Modbus protocol. Only the use
of the protocol is documented here.
The first byte of the Modbus RTU protocol is a single byte Modbus Slave ID. The TReX uses
the Slave ID as the Unit ID when the Modbus TCP protocol is used. These ID codes allow
multiple units to be addressed, or in the case of Modbus TCP, multiple units to be used on the
same IP address.
Modbus TCP
The Modbus/TCP extension includes 6 additional bytes to the original Modbus RTU protocol,
which allows for transport over the TCP/IP layers.
Only a single TCP connection is permitted at any one time.
The TReX sends these 6 bytes PLUS the entire RTU protocol payload (except the last two
CRC bytes). The first byte of the RTU protocol is the unit ID (usually described as part of the
Modbus MBAP header)
Function Codes
Listed are the supported Modbus function codes. All function codes not specified will return a
Modbus standard error response.
The TReX supports 1 MASTER plus up to 10 SLAVES wirelessly connected.
Note: in the following mapping, provision has been allowed for multiple SLAVE units. The
first single register (and in the case of discrete I/O, 8 registers) are for the MASTER unit, and
following registers are for the installed SLAVE units in the system.
© WTE Limited, 2018 – Christchurch New Zealand
Page 89 of 158