Siemens SIMATIC MV500 Operating Instructions Manual page 183

Hide thumbs Also See for SIMATIC MV500:
Table of Contents

Advertisement

Remember that you need to enter the required data ID in byte 4 of the "Receive" user data
interface.
Note
Compatible S7 controllers
The example program can only run on the following S7 controllers:
• On a CPU 318 and all S7-400 CPUs.
• On all S7-300 CPUs with MMC
On all other S7-300 and S7-400 CPUs, you must use SFCs 14 and 15 for all access to the two
user data interfaces.
Table 9- 43
Steps in the handshake procedure
Step
Activity in the user program of the PROFINET IO controller
1
Scan byte 1 of the "Send" user data interface cyclically. As long as this byte has the value "0", there is no
new data available. If the byte has the value "1", continue with step 2.
2
The value "1" in byte 1 of the "Send" user data interface means that the optical reader has started data
transmission.
Read out the net total length of the data to be transferred from bytes 2 and 3 of the "Send" user data inter-
face and the user data of the 1st data packet from bytes 5 to 31.
3
Acknowledge correct receipt of the 1st data packet by writing the value "1" to byte 1 of the "Receive" user
data interface.
The optical reader scans byte 1 of the "Receive" user data interface cyclically. As soon as it reads the value
"1", it fills bytes 5 to 31 of the "Send" user data interface with the user data of the 2nd data packet and
enters the number (value 2) of this data packet in byte 1.
4
Scan byte 1 of the "Send" user data interface cyclically. As long as this byte contains the number of the
previously transferred data packet (1), there is no new data available. As soon as byte 1 has the value "2"
(number of the next data packet), proceed to step 5.
5
Read the user data of the 2nd data packet from bytes 5 to 31.
6
Acknowledge correct receipt of the 2nd data packet by writing the value "2" to byte 1 of the "Receive" user
data interface.
...
...
Last - 4
Scan byte 1 of the "Send" user data interface cyclically. As long as byte 1 contains the number of the second
last data packet, the data of the last data packet is not yet available. As soon as byte 1 contains the number
of the last data packet, continue with the next step.
Last - 3
Read the user data of the last data packet from bytes 5 to 31.
Last - 2
Acknowledge receipt of the last data packet by writing the number of the last data packet to byte 1 of the
"Receive" user data interface.
The optical reader scans byte 1 of the "Receive" user data interface cyclically. As soon as it reads the number
of the last data packet, it writes the value "0" in the bytes 2 and 3 of the user data interface and also in the
byte 1. The end of the current data transfer is signaled to the I/O controller with the value "0" in byte 1.
Last -1
Scan byte 1 of the "Send" user data interface cyclically. As soon as this byte has the value "0", continue to
the next step.
Last
Acknowledge correct receipt of all data by writing the value "0" to byte 1 of the "Receive" user data inter-
face.
SIMATIC MV500
Operating Instructions, 03/2021, C79000-G8976-C494-05
Process interfacing via an automation system (PLC, PC)
9.4 Control with FB 79
183

Advertisement

Table of Contents
loading

Table of Contents