Communication processor and Modbus TCP
13.3 Point-to-point (PtP) communication
S7-1200 Programmable controller
System Manual, V4.2, 09/2016, A5E02486680-AK
1135
The STEP 7 user program must call the S7-1200 point-to-point instructions
cyclically/periodically to check for received messages. Polling the send tells the user
program when the transmit has completed.
Polling architecture: master
The typical sequence for a master is as follows:
1. A Send_P2P (Page 1122) instruction initiates a transmission to the CM or CB.
2. The Send_P2P instruction executes on subsequent scans to poll for the transmit
complete status.
3. When the Send_P2P instruction indicates that the transmission is complete, the user
code can prepare to receive the response.
4. The Receive_P2P (Page 1126) instruction executes repeatedly to check for a response.
When the CM or CB has collected a response message, the Receive_P2P instruction
copies the response to the CPU and indicates that new data has been received.
5. The user program can process the response.
6. Go to step 1 and repeat the cycle.
Polling architecture: slave
The typical sequence for a slave is as follows:
1. The user program executes the Receive_P2P instruction every scan.
2. When the CM or CB has received a request, the Receive_P2P instruction indicates that
new data is ready and the request is copied into the CPU.
3. The user program services the request and generates a response.
4. Use a Send_P2P instruction to send the response back to the master.
5. Repeatedly execute Send_P2P to be sure the transmit occurs.
6. Go to step 1 and repeat the cycle.
The slave must be responsible for calling Receive_P2P frequently enough to receive a
transmission from the master before the master times out while waiting for a response. To
accomplish this task, the user program can call RCV_PTP from a cyclic OB, where the cycle
time is sufficient to receive a transmission from the master before the timeout period expires.
If you set the cycle time for the OB to provide for two executions within the timeout period of
the master, the user program can receive transmissions without missing any.