Sample Programs; Sample Program For Interfacing The Vs 130-2 To A Simatic Controller With The Aid Of Fb79 - Siemens SIMATIC Vision Sensor VS 130-2 Manual

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

Advertisement

Process Interface
6.6

Sample Programs

6.6.1
Sample Program for Interfacing the VS 130-2 to a SIMATIC
Controller with the Aid of FB79
You will find the program described here on the manuals/commissioning CD in
Examples\SIMATIC.
Including FB79 in a STEP 7 Program
In the supplied STEP 7 program, the FC1 function contains a simple example for
outputting the result string. With FC2, you can bring about a code change. As
default, only FC1 is called in OB1. To activate FC2, you must either delete the first
network with the FC1 call or skip it.
Note
You may only apply the value W#16#0081 (output result string) to the COMMAND
parameter when bit 2 in the status byte (corresponds to the RDY signal) is set to
TRUE. Otherwise you receive the error "Illegal mode".
Process interfacing
The processing unit is connected over PROFIBUS DP or PROFINET IO to a
programmable controller. A light barrier or a Bero is also used to trigger and must
be read in over a digital input module. The received data is stored in data block
DB48 in bytes 0 to 500.
Adding the code change
Specify the number of the required code in memory byte MB200. The code change
is then automatic. The correct order of the commands is maintained. The FB
changes to the code specified in PARAM1.
Attention
!
To avoid undefined statuses in the plant, you should only change codes when the
plant is stopped or in manual mode.
OB100 startup OB
Set the RESET input of FB79 in OB100 to initialize the FB. This input is reset again
when FB79 is called.
6-32
Vision Sensor SIMATIC VS 130-2/VS 130-2vcr
A5E00475759-01

Advertisement

Table of Contents
loading

This manual is also suitable for:

Simatic vision sensor vs 130-2vcr

Table of Contents