Read Data
Original instructions
Description
A read operation transfers data from a specified slave source device to a master destination device on the network. The operation 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 2.
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.
You can perform a read operation on a nonexistent slave register. The slave detects and logs the status, which can last for several cycles.
NOTE: For Quantum PLC communication with a Premium/Atrium PLC, confirm that the addressing is made with an offset of 1. In order to access an address object n of a Premium PLC, confirm that the communication function of the Quantum PLC uses the n+1 address. IEC addressing starts at 0, and Modbus addressing starts at 1.
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
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.
Control Block Usage for TCP/IP Ethernet
Register
Meaning
CONTROL[1]
2 = read data
CONTROL[2]
Indicates the error status.
CONTROL[3]
Number of addresses 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]
  • most significant byte: network adapter module slot
  • least significant byte: MBP on Ethernet Transporter (MET) mapping index
CONTROL[6]
...
CONTROL[9]
Each address contains 1 byte of the 32-bit IP address, where the MSB is in CONTROL[6] and the LSB is in CONTROL[9].
Control Block Usage for SY/MAX Ethernet
Register
Meaning
CONTROL[1]
2 = read data
CONTROL[2]
Indicates the error status.
CONTROL[3]
Number of addresses to be read from the slave.
CONTROL[4]
Determines the %MW starting register in the slave to which the data is written, e.g., 1 = %MW1, 49 = %MW49.
CONTROL[5]
  • most significant byte: network adapter module slot
  • least significant byte: destination drop number
CONTROL[6]
...
CONTROL[9]
terminator: FF hex