Write Data
Original instructions
Description
A write operation transfers data from a master source device to a specified slave 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 1.
NOTE: Do not attempt to program an MBP_MSTR to write to its own drop address. This action causes the function block to generate an error in the CONTROL[2] register of the control block.
You can perform a write operation to 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 write 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]
1 = write data
CONTROL[2]
Indicates the error status.
CONTROL[3]
Number of addresses sent to 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]
...
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]
1 = write data
CONTROL[2]
Indicates the error status.
CONTROL[3]
Number of addresses sent to the slave.
CONTROL[4]
Determines the %MW start address of the slave to which the data is written.
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.
Control Block Usage for SY/MAX Ethernet
Register
Meaning
CONTROL[1]
1 = write data
CONTROL[2]
Indicates the error status.
CONTROL[3]
Number of addresses sent to 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