Siemens 6AV6651-7KA01-3AA4 - S7-1200 + KTP400 Basic Starter Kit 6AV6651-7KA01-3AA4 Manual Do Utilizador

Códigos do produto
6AV6651-7KA01-3AA4
Página de 364
Easy to communicate between devices 
 
7.10 PtP, USS, and Modbus communication protocols 
 
Easy Book 
168
 
Manual, 03/2014, A5E02486774-AF 
Table 7- 15  Modbus instructions 
Type of communication 
Instruction 
Modbus RTU (RS232 or RS485) 
MB_COMM_LOAD: One execution of MB_COMM_LOAD is used to set up PtP port 
parameters like baud rate, parity, and flow control. After the CPU port is configured 
for the Modbus RTU protocol, it can only be used by either the MB_MASTER or 
MB_SLAVE instructions. 
MB_MASTER: The Modbus master instruction enables the CPU to act as a Modbus 
RTU master device and communicate with one or more Modbus slave devices. 
MB_SLAVE: The Modbus slave instruction enables the CPU to act as a Modbus RTU 
slave device and communicate with a Modbus master device. 
Modbus TCP (PROFINET) 
MB_CLIENT: Make client-server TCP connection, send command message, receive 
response, and control the disconnection from the server. 
MB_SERVER: Connect to a Modbus TCP client upon request, receive Modbus 
message, and send response. 
The Modbus instructions do not use communication interrupt events to control the 
communication process. Your program must poll the MB_MASTER / MB_SLAVE or 
MB_Client / MB_Server instructions for transmit and receive complete conditions. 
A Modbus TCP client (master) must control the client-server connection with the 
DISCONNECT parameter. The basic Modbus client actions are shown below. 
1.  Initiate a connection to a particular server (slave) IP address and IP port number 
2.  Initiate client transmission of Modbus messages and receive the server responses 
3.  When required, initiate the disconnection of client and server to enable connection with a 
different server.