User manual
Transferring Data Using Communication Blocks
33002479 06 07/2008 163
Read Data
Description A read operation transfers data from a specified slave source device to a master
destination device on the network. It uses a master transaction path and may require
several cycles to complete. To program an MBP_MSTR block to perform a write
operation, use function code 1 (see Operational Function Codes, p. 151).
Network
Implementation
The read operation can be performed on Modbus Plus, TCP/IP Ethernet, and SY/
MAX Ethernet networks.
Control Block
Usage for
Modbus Plus
Note: Do not attempt to program an MBP_MSTR to read to its own station address.
This action causes the function block to generate an error in the CONTROL[2]
register of the control block (see Network Control Block Structures, p. 152).
You can perform a read operation on a nonexistent slave register. The slave
detects the status and logs it. This can last for several cycles.
Register Meaning
CONTROL[1] 2 = Read data
CONTROL[2] Indicates the error status.
CONTROL[3] Number of registers to be read from the slave
CONTROL[4] Determines the %MW starting register in the slave from which the data is
read, e.g., 1 = %MW1, 49 = %MW49).
CONTROL[5]
...
CONTROL[9]
Routing register 1 is used to specify the address (routing path address 1 of
5) of the node during a network transfer.
The last byte in the routing path that is not 0 is the destination node.