Programming The Data Block - Siemens SIMATIC Vision Sensor VS 130-2 Manual

Hide thumbs Also See for SIMATIC Vision Sensor VS 130-2:
Table of Contents

Advertisement

6.5.4

Programming the Data Block

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 or
I/O controller regardless of any configured PROFIBUS or PROFINET consistency
mechanisms. This mechanism must be used for every transfer, even when this is
only from one data block, for example, when reading out the code number selected
on the VS 130-2.
Please remember to enter the required data ID in byte 4 of the "Receive" user data
interface before the first transfer.
Note
Handshaking is executable in the specified form only on the following S7 CPUs:
on a CPU 318 and the S7-400 CPUs as of firmware version V3.0.0
on S7-300 CPUs with MMC
for all other S7-300 and S7-400 CPUs, you have to use the SFC 14s and 15s for
all access to both user data interfaces.
Step
Activity in the DP Master or I/O Controller User Program
1
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.
2
The value 1 in byte 1 of the "Send" user data interface means: VS 130-2 has started data
transfer.
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 5 to 31.
3
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 polls byte 1 of the "Receive" user data interface. 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
second data packet and enters the number of this data package (in this case 2) in byte 1.
4
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.
5
Read the user data of the second data packet from bytes 5 to 31.
6
Acknowledge correct receipt of the second data packet by writing the value 2 in byte 1 of the
"Receive" user data interface.
...
...
Last - 4
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.
Last - 3
Read the user data of the last data packet from bytes 5 to 31.
Vision Sensor SIMATIC VS 130-2/VS 130-2vcr
A5E00475759-01
Process Interface
6-17

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic vision sensor vs 130-2vcr

Table of Contents