Programming Data Fragmentation - Siemens SIMATIC MV550 S Operating Instructions Manual

Table of Contents

Advertisement

Process interfacing via an automation system (PLC, PC)
9.4 Control with FB 79
9.4.4

Programming data fragmentation

Handshaking
The following sections introduce a handshaking procedure that ensures the consistency of
all the data transferred from the optical reader to the I/O controller regardless of any
configured consistency mechanisms in PROFINET. This procedure must be used with every
data transfer, even if the transfer only consists of one data block, for example when reading
out the program number selected on the optical reader.
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 controller:
• 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 sec-
ond 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.
138
Operating Instructions, 05/2019, C79000-G8976-C494-02
SIMATIC MV500

Advertisement

Table of Contents
loading

Table of Contents