Siemens Stud Sensor E12 User Manual

Industry Automation and Drive Technologies - SCE
Training Manual for Integrated Automation
Solutions
Totally Integrated Automation (TIA)
MODULE E12
VISION SENSOR Shape Checking
with SIMATIC S7-300F-2 PN/DP and VS120
TIA Training Document E12 Status: 01/2010 Vision Sensor Shape Check with SIMATIC S7-300F 2PN/DP and VS120
Page 1 of 47 Module
Industry Automation and Drive Technologies - SCE
This manual was prepared for training purposes by Siemens AG for the project Siemens Automation Cooperates with Education (SCE). Siemens AG does not guarantee the contents of this document.
Passing on this document as well as copying it, using and communicating its contents is permitted within public training and continued education facilities. Exceptions require the written permission by Siemens AG (Michael Knust michael.knust@siemens.com). Violators are held liable to pay damages. All rights -including translation- reserved, particularly if a patent is granted, or a utility model or design is registered.
We wish to thank the Michael Dziallas Engineering corporation and the instructors of vocational schools as well as all those who provided support during the preparation of this manual.
TIA Training Document E12 Status: 01/2010 Vision Sensor Shape Check with SIMATIC S7-300F 2PN/DP and VS120
Page 2 of 47 Module
Industry Automation and Drive Technologies - SCE
PAGE
1. Preface.....................................................................................................Fehler! Textmarke nicht definiert.
2. Notes on using the CPU 315F-2 PN/DP .........................................................................................................7
3. Notes on the SIMATIC VS120 components....................................................................................................7
3.1.
Product Description ................................................................................................................................7
3.2.
Performance Features ...........................................................................................................................8
3.3.
Function..................................................................................................................................................8
3.4.
Recording and Reading Out Recognition Values in a PROFINET IO Environment...............................9
3.5.
Setting the Communication Interface of the VS120 to PROFINET ......................................................10
4. Starting up a project with CPU 315F-2 PN/DP and VS120...........................................................................12
4.1.
Setting Up a New Project .....................................................................................................................13
4.2.
Configuring the Hardware ....................................................................................................................15
4.3.
Assigning the Device Name .................................................................................................................23
4.4.
Inserting Blocks and FB1 and DB10 into the Project ...........................................................................25
4.5.
Function Block FB1 ..............................................................................................................................25
4.6.
Operating FB1 ......................................................................................................................................28
4.7.
FB1 Error Information...........................................................................................................................29
4.8.
Data Block DB10 ..................................................................................................................................29
4.9.
Supplementing the Symbol Table ........................................................................................................31
4.10. FC10 Control Program .........................................................................................................................31
4.11. Calling FC10 in OB1.............................................................................................................................33
5. WEB Server based operator interface of VS120 ..........................................................................................34
5.1.
Setting Up and Evaluating the Model...................................................................................................34
5.2.
Setting up the Model Set and Evaluating the Model Number...............................................................42
6. Results of image evaluation in the CPU .......................................................................................................46
6.1.
Web View of the Evaluation .................................................................................................................46
6.2.
DB10 Data View ...................................................................................................................................46
6.3.
Variable Table DB_Values ...................................................................................................................47
6.4.
Symbol Table .......................................................................................................................................47
TIA Training Document E12 Status: 01/2010 Vision Sensor Shape Check with SIMATIC S7-300F 2PN/DP and VS120
Page 3 of 47 Module
Industry Automation and Drive Technologies - SCE
The following symbols serve as a guide through Module E12:
Information
Programming
Sample Task
Notes
TIA Training Document E12 Status: 01/2010 Vision Sensor Shape Check with SIMATIC S7-300F 2PN/DP and VS120
Page 4 of 47 Module
Industry Automation and Drive Technologies - SCE
2 to 3
days
Module
s A
1 PREFACE
Regarding its content, Module E12 is part of the instruction unit ’IT Communication with S7’.
Fundamentals of STEP7 Programming
Additional Functions of STEP7 Programming
2 to 3 days Modules B
System Simulation with SIMIT SCE
1 to 2 days Modules G
Programming Languages
2 to 3 days Modules
C
Industrial Fieldbus Systems
2 to 3 days Modules
D
Process Visualization
2 to 3 days Modules F
Frequency Converter at SIMATIC S7
2 to 3 days Modules H
IT Communication with SIMATIC S7
2 to 3 days Modules
Objective
In Module E12, the reader learns how networking and data exchange between PLCs and the vision sensor evaluation device VS120 is set up. As PLC, the CPU 315F-2 PN/DP and as vision sensor evaluation device the VS120 system for the shape check are used. The SIMATIC VS120 components consist of an evaluation device with a sensor head and an LED ring lamp. PROFINET is used for networking between the PLC and the SIMATIC VS120. Module E12 shows in principle the procedure for the startup, based on a brief example. .
Prerequisites
To successfully work through Module E12, the following knowledge is assumed:
How to handle Windows
Fundamentals of PLC programming with Step7 (for example, Module A3 ‘Startup’ PLC
Programming with STEP7)
Fundamentals of network engineering (for example: Appendix V – Basics of Network Engineering)
TIA Training Document E12 Status: 01/2010 Vision Sensor Shape Check with SIMATIC S7-300F 2PN/DP and VS120
Page 5 of 47 Module
Industry Automation and Drive Technologies - SCE
Hardware and software required
1 PC, operating system Windows XP Professional with SP2 or SP3/Vista 32 Bit Ultimate and
Business/Server 2003 SP2 with 600MHz (only XP)/1 GHz and 512MB (only XP)/1 GB RAM, free disk storage approx. 650 to 900 MB, MS Internet Explorer 6.0 and network card
2 Software STEP 7 V 5.4 3 SPS SIMATIC S7300 with CPU 315F-2 PN/DP and at least one digital input and output module.
Sample configuration:
- Power supply: PS 307 2A
- CPU: CPU 315F-2 PN/DP
- Digital inputs: DI 16x24VDC
- Digital outputs: DO 16x24VDC/0.5 A
4 SIMATIC VS120 evaluation device with sensor head and LED ring lamp 5 Ethernet connection between PC, CPU 315F-2 PN/DP and VS120
2 STEP 7
1 PC
5 Ethernet Connection
3 SIMATIC S7-300 with
CPU 315F-2 PN/DP
4 SIMATIC VS120 with sensor head and LED ring lamp
TIA Training Document E12 Status: 01/2010 Vision Sensor Shape Check with SIMATIC S7-300F 2PN/DP and VS120
Page 6 of 47 Module
Industry Automation and Drive Technologies - SCE
2 NOTES ON USING THE CPU 315F-2 PN/DP
The CPU 315F-2 PN/DP is a CPU that is shipped with 2 integrated interfaces.
- The first interface is a combined MPI/PROFIBUS DP interface that can be used at the PROFIBUS DP as master or slave to connect distributed IO/field devices with very fast reaction time. In addition, it is possible to program the CPU here by means of an MPI or PROFIBUS DP
- The second interface is an integrated PROFINET interface. This allows for using the CPU as PROFINET IO controller to operate distributed IO
on PROFINET. The CPU can be programmed by means of this interface also!
- Moreover, it is possible to use fail-safe IO devices on both interfaces.
Notes:
- In module E12, the CPU 315F-2 PN/DP is used as the controller for the data exchange of a
SIMATIC RFID system on the PROFINET.
- To run this CPU, a micro-memory card is required!
- The addresses of the input and output modules can be parameterized at this CPU.
3 NOTES ON THE SIMATIC VS120 COMPONENTS
3.1 Product Description
The vision sensor SIMATIC VS120 is used to optically recognize and check objects applying the incident light method. The vision sensor SIMATIC VS120 checks whether the object is the correct one, whether it is intact, and what its position is.
The vision sensor SIMATIC VS120 supplies the following recognition values for object recognition:
• x-coordinate
• y-coordinate
• angle
• Quality values of the object being checked, number of the parts found
This object recognition data is transmitted to evaluation units in automation systems. The data is then processed in the evaluation units of the automation systems.
The vision sensor SIMATIC VS120 is suitable for the following:
• Recognizing parts for sorting tasks
• Determining the position for Pick&Place applications
• Existence check and position check in manufacturing
• Position check for feed engineering; for example, for swing conveyors
<<?>>
, workpiece carriers,
circulation systems and gripper units as well as robots
• Quality control of checked objects
TIA Training Document E12 Status: 01/2010 Vision Sensor Shape Check with SIMATIC S7-300F 2PN/DP and VS120
Page 7 of 47 Module
Industry Automation and Drive Technologies - SCE
3.2 Performance Features
• Incident light method with LED ring lamp
• Object recognition with object search and object check
• Startup by means of setup support at the PG/PC with installed Internet Explorer
• Up to 20 object checks per second
• Up to 64 objects to be checked can be stored
• To sort the objects to be checked, 2 digital outputs are provided: OK, N_OK
• Operator interface is completely Web-based
• Extensive operating and monitoring functions also in the evaluation mode
• Extensive diagnosis functions and logging functions
• Firmware update by means of the operator interface of the Web browser
• Control by means of digital I/O, PROFIBUS DP and PROFINET IO
Result output by means of
– PROFIBUS DP – PROFINET IO – RS232 interface of an RS232 Ethernet converter – TCP/IP connection of the PC/PG
3.3 Function
Checking the properties of an object to be checked for correctness
64 models are provided to recognize objects to be checked. The SIMATIC VS120 checks whether the individual characteristics of the object to be checked are shaped as the trained model is. When specifying the recognition and evaluation area, glossy areas on the objects to be tested are to be avoided.
Recognition principles of edges
To recognize image patterns, edges are used. These edges in the images are transitions from light to dark or vice versa. A model is generated from the sum of edges extracted in the picture, and from their arrangement.
Recognizing and localizing parts
The SIMATIC VS120 recognizes objects to be checked and determines the coordinates including the rotational position and forwards them -for example, by means PROFIBUS DP- to a control system like the S7.
Checking a model for completeness
In addition, the SIMATIC VS120 checks the objects in question for completeness. Deviations from the trained model are detected, and the quality values of the evaluation are displayed.
Sorting functions of models in model sets
Depending on the importance of the application, it is possible to group and store 15 model sets for evaluation with 64 possible models. When evaluated with the SIMATIC VS120, the models are sorted
-according to the application- with a control system.
TIA Training Document E12 Status: 01/2010 Vision Sensor Shape Check with SIMATIC S7-300F 2PN/DP and VS120
Page 8 of 47 Module
Industry Automation and Drive Technologies - SCE
Automation System
3.4 Recording and Reading Out Recognition Values in a PROFINET IO Environment
• By means of the Ethernet (TCP/IP) and a switch, a PC/PG is connected that is used exclusive for
the setup process.
• By means of the Ethernet and a switch, a connection exists to an automation systems with
PROFINET IO capability.
• The SIMATIC VS120 is controlled by the automation system.
• The result of the objects to be checked is read out via PROFINET IO to the automation system
Power Supply
Power Supply Cable
Functional Ground Cable
Illumination Cable
Sensor Cable
Evaluation Device
Sensor Head
PC/PG to support setup
Cable DI/DO
LED Ring Light
Object
Conveying Direction
Light Barrier
Conveyor
Additional information is provided in Chapter 3 of the operating instructions “Image Processing Systems Vision Sensor SIMATIC VS120“.
TIA Training Document E12 Status: 01/2010 Vision Sensor Shape Check with SIMATIC S7-300F 2PN/DP and VS120
Page 9 of 47 Module
Industry Automation and Drive Technologies - SCE
3.5 Setting the Communication Interface of the VS120 to PROFINET
First, switch on the power supply of the evaluation device VS120 for the initial startup.
At the initial startup, "Factory Settings Used" appears on the LCD display. Confirm with "OK". The VS120 will then perform a self test:
• Checking the Ethernet connection
Press ESC
• Functional check of the sensor head
Press ESC
After completion of the self test, "Adjust" appears on the LCD display
Press OK to get to the main menu
At any additional start of the SIMATIC VS120, the evaluation device VS120 performs the following self test:
• Checking the stored settings and model data
• Checking the Ethernet connection
• If needed, checking the connection to PROFINET IO
• If needed, checking the Ethernet RS232 converter or TCP server and to the PC/PG
<<?>>
• If needed, checking whether it is possible to exchange data from and to PROFIBUS DP
• Function check of the sensor head
• If needed, checking the connection for archiving the model data
If the self test ran without a fault, the following is indicated on the LCD display: the main menu, the display "Adjust", or the RUN menu, depending on the status at the last switch-off.
You may have to press ESC several times to get to the main menu
In addition, we navigate in the LCD display between the menus, and make entries.
"Main" Menu:
To set the VS120 to PROFINET, we have to get to the “Connect“ menu. Place the cursor in front of Connect, and press the OK key.
TIA Training Document E12 Status: 01/2010 Vision Sensor Shape Check with SIMATIC S7-300F 2PN/DP and VS120
Page 10 of 47 Module
Industry Automation and Drive Technologies - SCE
"Connect" Menu:
The Ethernet IP mode has to be set to PNIO.
Place the cursor in front of Ports and press the OK button Place the cursor in front of Ethernet and press the OK button Place the cursor in front of IP Mode and press the OK button Place the cursor in front of PNIO and press the OK button
The evaluation device now requests a restart; press the OK button to confirm. After the restart, the red bus error LED (BF) flashes until communication is established by means of PROFINET between a controller and the VS120.
ESC may have to be pressed several times to get to the main menu.
All additional information for operating the evaluation device is provided in chapters 8.3, 8.4 and 9.2 of the operating instructions “Image Processing Systems Vision Sensor SIMATIC VS120“.
TIA Training Document E12 Status: 01/2010 Vision Sensor Shape Check with SIMATIC S7-300F 2PN/DP and VS120
Page 11 of 47 Module
Industry Automation and Drive Technologies - SCE
4 STARTING UP A PROJECT WITH CPU 315F-2 PN/DP AND VS120
Below, starting up the VS120 in a project is described.
As SIMATIC S7-300 Station, the CPU 315F-2 PN/DP is used.
In the CPU’s control program, a data structure has to be generated by means of a function block call
(FB1) with data block (DB10).
The data structure looks like this:
FB1
for VS120
DB10
Result of the form checl
Instance DB1 of FB1
All additional information is provided in Chapter 10 of the operating instructions “Image Processing Systems Vision Sensor SIMATIC VS120“.
TIA Training Document E12 Status: 01/2010 Vision Sensor Shape Check with SIMATIC S7-300F 2PN/DP and VS120
Page 12 of 47 Module
Industry Automation and Drive Technologies - SCE
4.1 Setting Up a New Project
1. The central tool in STEP 7 is the ’SIMATIC Manager’. It is called here with a double click (
SIMATIC Manager)
2. STEP7 programs are managed in projects. We are now setting up such a project
( File New)
3. Now, the project is assigned the ’Name’ ’VS120’ ( VS120 OK)
TIA Training Document E12 Status: 01/2010 Vision Sensor Shape Check with SIMATIC S7-300F 2PN/DP and VS120
Page 13 of 47 Module
Industry Automation and Drive Technologies - SCE
4. Next, highlight your project and insert an ’Industrial Ethernet Subnet’.
( VS120 Insert Subnet Industrial Ethernet).
5. Now, a ’SIMATIC 300 Station’ is inserted ( Insert Station SIMATIC300 Station)
TIA Training Document E12 Status: 01/2010 Vision Sensor Shape Check with SIMATIC S7-300F 2PN/DP and VS120
Page 14 of 47 Module
Industry Automation and Drive Technologies - SCE
4.2 Configuring the Hardware
6. With a double click, open the configuration tool for the ’Hardware’. ( Hardware)
7. Open the hardware catalog by clicking on the symbol ' ’. ( )
Insert the ’Mounting Channel’ with a double click ( SIMATIC 300 RACK-300 Mounting Channel).
Note:
Then, a configuration table is displayed automatically for setting up Rack 0.
TIA Training Document E12 Status: 01/2010 Vision Sensor Shape Check with SIMATIC S7-300F 2PN/DP and VS120
Page 15 of 47 Module
Loading...
+ 32 hidden pages