Consistent Data Transmission - Siemens SIMATIC VS130 Series Manual

Vision sensor
Table of Contents

Advertisement

Controlling with a PLC
6.2.4

Consistent Data Transmission

Handshaking
The following section introduces a handshake mechanism that ensures the
consistency of all the data sent from the processing unit to the DP master
regardless of any configured PROFIBUS consistency mechanisms.
Step
1
2
3
4
5
6
...
Last - 4
Last - 3
Last - 2
Last - 1
Last
6-10
Activity in the User Program of the DP Master
Query byte 1 of the "Send" user data interface cyclically. As long as this byte
has the value 0, there is no new data. If it has the value 1, go to step 2.
The value 1 in byte 1 of the "Send" user data interface means: The VS 130
has started data transmission.
Read the net total length of the data to be transferred from bytes 2 and 3 of
the "Send" user data interface and the user data of the first data packet from
bytes 4 to 31.
Acknowledge correct receipt of the first data packet by writing the value 1 in
byte 1 of the "Receive" user data interface.
The processing unit queries byte 1 of the "Receive" user data interface. As
soon as it reads the value 1, it fills bytes 4 to 31 of the "Send" user data
interface with the user data of the second data packet and enters the number
of this data package (in this case 2) in byte 1.
Query byte 1 of the "Send" user data interface cyclically. As long as this still
contains the number of the previously transferred data packet (1), there is no
new data. As soon as byte 1 has the value 2 (number of the next data packet),
go to step 5.
Read the user data of the second data packet from bytes 4 to 31.
Acknowledge correct receipt of the second data packet by writing the value 2
in byte 1 of the "Receive" user data interface.
...
Query byte 1 of the "Send" user data interface cyclically. As long as this
contains the number of the last but one data packet, the data of the last data
packet is not yet available. As soon as byte 1 has the number of the last data
packet, go to next step.
Read the user data of the last data packet from bytes 4 to 31.
Acknowledge receipt of the last data packet by writing the number of the last
data packet in byte 1 of the "Receive" user data interface.
The processing unit queries byte 1 of the "Receive" user data interface. As
soon as it reads the number of the last data packet, it writes the value 0 to
bytes 2 and 3 of the user data interface and also to byte 1. The value 0 in byte
1 signals the end of the current data transfer to the DP master.
Query byte 1 of the "Send" user data interface cyclically. As soon as the value
0 is read, go to last step.
Acknowledge correct receipt of all data by writing the value 0 in byte 1 of the
"Receive" user data interface.
Vision Sensor VS 130
A5E00199459-01

Advertisement

Table of Contents
loading

Table of Contents