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:
-
server: a message with Unit ID value of 255 is directed to and processed by the communication module itself. Other messages are passed to the CPU.
-
client: a message with Unit ID value of 251 is translated by the communication module into the Unit ID value 255 before sending the message to the target device. Other values—except Unit ID value 255—are passed to the CPU. In its role as client, the communication module will not support the directly entered Unit ID value of 255.
NOTE: In order to submit a Unit ID value of 255 to a server, you need to enter the Unit ID value 251 into the ADDR block of the client communication module’s logic.
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):
-
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.