Polling Architecture - Siemens S7-1200 System Manual

Hide thumbs Also See for S7-1200:
Table of Contents
12.3.4.1

Polling architecture

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_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
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 executes the RCV_PTP instruction every scan.
2. When the CM or CB has received a request, the RCV_PTP instruction indicates that new
3. The user program services the request and generates 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.
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.
S7-1200 Programmable controller
System Manual, 03/2014, A5E02486680-AG
complete status.
code can prepare to receive the response.
or CB has collected a response message, the RCV_PTP instruction copies the response
to the CPU and indicates that new data has been received.
data is ready and the request is copied into the CPU.
Communication processor and Modbus TCP
12.3 Point-to-point (PtP) communication
703
Table of Contents
loading

Table of Contents