Polling Architecture - Siemens SIMATIC S7 System Manual

Hide thumbs Also See for SIMATIC S7:
Table of Contents

Advertisement

The communication modules 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.
Additional instructions provide the capability to reset the receive buffer,
and to get and set specific RS232 signals.
8.6.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 communication module.
2. The SEND_PTP instruction is executed on subsequent scans to poll for the transmit
3. When the SEND_PTP instruction indicates that the transmission is complete, the user
4. The RCV_PTP instruction is executed repeatedly to check for a response. When the CM
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 should execute the RCV_PTP instruction every scan.
2. When the CM has received a request, the RCV_PTP instruction will indicate that new
3. The user program should service the request and generate a response.
4. Use a SEND_PTP instruction to send the response back to the master.
5. Repeatedly execute SEND_PTP to be sure the transmit occurs.
6. Go to step 1 and repeat the cycle.
The slave must be responsible for calling RCV_PTP 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.
S7-1200 Programmable controller
System Manual, 11/2009, A5E02486680-02
complete status.
code can prepare to receive the response.
has collected a response message, the RCV_PTP instruction will copy the response to
the CPU and indicate that new data has been received.
data is ready and the request will be copied into the CPU.
Point-to-Point (PtP) communications
8.6 Programming the PtP communications
 SEND_PTP
 RCV_PTP
 RCV_RST
 SGN_GET
 SGN_SET
247

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic s7-1200

Table of Contents