Configuring Modbus TCP Explicit Messaging Using SEND_REQ
(Original Document)
Introduction
When you use the SEND_REQ block to create an explicit message for a Modbus TCP device, configure this block the same way you would configure it for any other Modbus communication. Refer to the Control Expert online help for instructions on how to configure the SEND_REQ block.
Configuring ADDR Block Unit ID Settings
When you configure the SEND_REQ block, you can use the ADDR block to set the SEND_REQ block’s Address parameter. The ADDR block presents the configuration format ADDR(‘Rack.Slot.Channel.UnitID’) where:
The parameter...
Represents...
Rack
the number assigned to the rack containing the TSX ETC 101 communication module
Slot
the position of the TSX ETC 101 communication module in the rack
Channel
the communication channel—which is set to a value of 0
Unit ID
the destination node address, also known as the Modbus Plus on Ethernet Transporter (MET) mapping index value
The Unit ID value in a Modbus message indicates the destination of the message. The manner in which the TSX ETC 101 communication module handles the Unit ID value depends upon its role as either a server or a client. When the communication module acts as a:
Contents of the Received_Data Parameter
The Received_Data parameter contains the Modbus response. The length of the response varies, and is reported by Management_Param[3] after the response is received. The format of the Modbus response is described, below:
Offset (words)
Length (bytes)
Description
0
2
First word of the Modbus response:
  • High byte (MSB):
    • if successful: Modbus Function Code
    • if not: Modbus function code + 16#80
  • Low byte (LSB):
1
Length of the Received_Data parameter – 2
Remainder of the Modbus response: depends on the specific Modbus request)
NOTE: Structure the response in little endian order.