105BCommunication processor
12.5 Modbus communication
12.5.2.4
MB_CLIENT example 1: Multiple requests with common TCP connection
Multiple Modbus client requests can be sent over the same connection. To accomplish this,
use the same instance DB, connection ID, and port number.
Only 1 client can be active at any given time. Once a client completes its execution, the next
client begins execution. Your program is responsible for the order of execution.
The example shows both clients writing to the same memory area. Also, a returned error is
captured which is optional.
Network 1: Modbus function 1 - Read 16 output image bits
Network 2: Modbus function 2 - Read 32 input image bits
596
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05