Configuration instructions
Before your user program can engage in PtP communication, you must configure the
communication interface port and the parameters for sending data and receiving data.
You can perform the port configuration and message configuration for each CM or CB
through the device configuration or through these instructions in your user program:
● PORT_CFG (Page 534)
● SEND_CFG (Page 535)
● RCV_CFG (Page 537)
Communication instructions
The PtP communication instructions enable the user program to send messages to and
receive messages from the communication interfaces. For information about transferring
data with these instructions, see the section on data consistency (Page 143).
All of the PtP functions operate asynchronously. The user program can use a polling
architecture to determine the status of transmissions and receptions. SEND_PTP and
RCV_PTP can execute concurrently. The communication modules and communication board
buffer the transmit and receive messages as necessary up to a maximum buffer size of 1024
bytes.
The CMs and CB send messages to and receive messages from the actual point-to-point
devices. The message protocol is in a buffer that is either received from or sent to a specific
communication port. The buffer and port are parameters of the send and receive
instructions:
● SEND_PTP (Page 541)
● RCV_PTP (Page 544)
Additional instructions provide the capability to reset the receive buffer, and to get and set
specific RS232 signals:
● RCV_RST (Page 546)
● SGN_GET (Page 547)
● SGN_SET (Page 548)
12.3.4.1
Polling architecture
The S7-1200 point-to-point instructions must be called cyclically/periodically to check for
received messages. Polling the send will tell the user program when the transmit has
completed.
Polling architecture: master
The typical sequence for a master is as follows:
1. A SEND_PTP instruction initiates a transmission to the CM or CB.
2. The SEND_PTP instruction is executed on subsequent scans to poll for the transmit
S7-1200 Programmable controller
System Manual, 11/2011, A5E02486680-05
complete status.
105BCommunication processor
12.3 Point-to-Point (PtP) communication
561