PlugInPE_e.pdf

(683 KB) Pobierz
24.10.2001
Contents
1
Introduction
Creating Plug-In Inspection
Elements
2
SIMATIC
How to Install Plug-In Inspection
Elements
3
ProVision
Structure of Plug-In Inspection
Elements
4
5
Programming Software for
Plug-In Inspection Elements
Vision Type Classes
A
Appendix
Manual
Edition 10/2001
A5E00105134-01
921847490.050.png 921847490.058.png 921847490.059.png 921847490.060.png 921847490.001.png 921847490.002.png 921847490.003.png 921847490.004.png 921847490.005.png 921847490.006.png 921847490.007.png
24.10.2001
Safety Guidelines
This manual contains notices intended to ensure personal safety, as well as to protect the products and
connected equipment against damage. These notices are highlighted by the symbols shown below and
graded according to severity by the following texts:
Danger
indicates that death, severe personal injury or substantial property damage will result if proper
precautions are not taken.
!
Warning
indicates that death, severe personal injury or substantial property damage can result if proper
precautions are not taken.
!
Caution
indicates that minor personal injury can result if proper precautions are not taken.
!
Caution
indicates that property damage can result if proper precautions are not taken.
Notice
draws your attention to particularly important information on the product, handling the product, or to a
particular part of the documentation.
Qualified Personnel
Only qualified personnel should be allowed to install and work on this equipment. Qualified persons are
defined as persons who are authorized to commission, to ground and to tag circuits, equipment, and
systems in accordance with established safety practices and standards.
Correct Usage
Note the following:
Warning
This device and its components may only be used for the applications described in the catalog or the
technical description, and only in connection with devices or components from other manufacturers
which have been approved or recommended by Siemens.
!
This product can only function correctly and safely if it is transported, stored, set up, and installed
correctly, and operated and maintained as recommended.
Trademarks
SIMATIC®, SIMATIC HMI® and SIMATIC NET® are registered trademarks of SIEMENS AG.
Third parties using for their own purposes any other names in this document which refer to trademarks might
infringe upon the rights of the trademark owners.
Copyright © Siemens AG 2001 All rights reserved
The reproduction, transmission or use of this document or its
contents is not permitted without express written authority.
Offenders will be liable for damages. All rights, including rights
created by patent grant or registration of a utility model or design,
are reserved.
Disclaimer of Liability
We have checked the contents of this manual for agreement with
the hardware and software described. Since deviations cannot be
precluded entirely, we cannot guarantee full agreement. However,
the data in this manual are reviewed regularly and any necessary
corrections included in subsequent editions. Suggestions for
improvement are welcomed.
Siemens AG
Bereich Automatisierungs- und Antriebstechnik
Geschaeftsgebiet Industrie-Automatisierungssysteme
Postfach 4848, D- 90327 Nuernberg
©Siemens AG 2001
Technical data subject to change.
Siemens Aktiengesellschaft
A5E00105134
921847490.008.png 921847490.009.png 921847490.010.png 921847490.011.png 921847490.012.png 921847490.013.png 921847490.014.png 921847490.015.png 921847490.016.png 921847490.017.png 921847490.018.png 921847490.019.png 921847490.020.png 921847490.021.png 921847490.022.png 921847490.023.png 921847490.024.png 921847490.025.png 921847490.026.png 921847490.027.png 921847490.028.png 921847490.029.png 921847490.030.png 921847490.031.png 921847490.032.png 921847490.033.png 921847490.034.png
 
24.10.2001
Contents
1
Introduction
1.1
Overview of ProVision/OEM Development Kit .................................................. 1-1
1.2
Plug-In Inspection Element Wizard and Vision Type Classes .......................... 1-2
1.3
Installation of the Plug-In Inspection Element Wizard ...................................... 1-3
1.4
Developing Environment .................................................................................. .1-4
1.4.1
Tools................................................................................................................. .1-4
1.4.2
Settings ............................................................................................................ .1-4
2
Creating Plug-In Inspection Elements
2.1
Overview .......................................................................................................... .2-1
2.2
How to .............................................................................................................. .2-1
2.2.1
How to Create a Project ................................................................................... .2-1
2.2.2
How to Configure the Plug-In Inspection Element ........................................... .2-2
2.2.3
Building the Project .......................................................................................... .2-3
2.2.4
How to Insert Subprojects ................................................................................ .2-4
2.2.5
Adding User Code to the Plug-In Inspection Element ..................................... .2-5
2.2.6
How to Compile the Project.............................................................................. .2-6
2.2.7
How to Create Setup........................................................................................ .2-7
3
How to Install Plug-In Inspection Elements
3.1
Overview .......................................................................................................... .3-1
3.2
Installation on Programming Devices .............................................................. .3-1
3.2.1
Setup Frame .................................................................................................... .3-1
3.2.2
Installation ........................................................................................................ .3-2
3.2.3
Uninstalling....................................................................................................... .3-2
3.3
Installation on Target Systems......................................................................... .3-3
3.3.1
Installing ........................................................................................................... .3-3
3.3.2
Uninstalling....................................................................................................... .3-3
4
Structure of Plug-In Inspection Elements
4.1
Project Directory............................................................................................... .4-1
4.2
The Structure of Inspection Elements.............................................................. .4-2
4.3
Inspection Element Methods............................................................................ .4-4
4.3.1
Basic Class PEBase ........................................................................................ .4-5
4.3.2
Inspection Element Meta Class........................................................................ .4-6
4.4
Coding Image Processing Algorithms.............................................................. .4-7
ProVision Programming Software for Plug-In Inspection Elements
A5E00105134-01
iii
921847490.035.png 921847490.036.png 921847490.037.png 921847490.038.png 921847490.039.png
24.10.2001
Contents
5
Vision Type Classes
5.1
Basic Class TYBase.......................................................................................... 5-1
5.1.1
Valid Flag ......................................................................................................... .5-2
5.1.2
Reset Flag ........................................................................................................ .5-2
5.1.3
UseType ........................................................................................................... .5-3
5.1.4
Vision Type Float – Class TYFloat................................................................... .5-3
5.1.5
Vision Type String Class TYString ................................................................... .5-4
5.2
Constant Vision Types ...................................................................................... 5-5
5.2.1
Vision Type Integer – Class TYInteger ............................................................ .5-5
5.2.2
Vision Type Mode – Class TYOperator ........................................................... .5-5
5.3
Complex Vision Types ...................................................................................... 5-6
5.3.1
Vision Type Center Point – Class TYStartPoint............................................... .5-7
5.3.2
Vision Type Coordinate System – Class TYCoordSys .................................. .5-11
5.3.3
Vision Type Line – Class TYLine ................................................................... .5-13
5.3.4
Vision Type Vector – Class TYVector ............................................................ .5-16
5.3.5
Vision Type Window – Class TYAngleWindow.............................................. .5-22
5.3.6
Vision Type Circle and Circle Ring – Class TYRealCircle or TYRing............ .5-29
5.3.7
Vision Type Ring Form – Class TYRingform ................................................. .5-39
5.3.8
Vision Type Histogram – Class TYHistogram ................................................ .5-45
5.4
Internal Vision Types...................................................................................... .5-48
5.4.1
Class TYVectorData....................................................................................... .5-48
5.4.2
Class TYWindowData .................................................................................... .5-48
5.5
Error Classes.................................................................................................. .5-50
5.5.1
Exception Class TYException ........................................................................ .5-50
5.5.2
Exception Class PEException........................................................................ .5-50
A
Appendix
A.1
Example of a Plug-In Inspection Element ........................................................ A-1
ProVision Programming Software for Plug-In Inspection Elements
iv
A5E00105134-01
921847490.040.png 921847490.041.png 921847490.042.png 921847490.043.png 921847490.044.png 921847490.045.png 921847490.046.png 921847490.047.png 921847490.048.png
24.10.2001
1
Introduction
1.1
Overview of ProVision/OEM Development Kit
The ProVision/OEM Development Kit (MLFB 6GF8007-0AA21) supports
operation of the SIMATIC VS 710 vision sensor with your own software. You have
two options:
·
As OEM user of the SIMATIC VS 710 vision sensor you discard the ProVision
operating software and create your own. In this case VS 710 OEM
Development Kit provides the drivers required for operation of the SIMATIC
VS 710 vision sensors. For closer detail refer to the user manual "VS 710 OEM
Development Kit" (A5E00101546).
·
You enhance the extensive ProVision database of inspection elements for
image processing with specific elements tailored to your target requirements.
IN this case, create Plug-in inspection elements for the ProVision configuration
and runtime software on your target system according to your requirements.
The ProVision programming software for Plug-in Inspection Elements
supports you when doing so. This software includes a Plug-in Inspection
Element Wizard and a Vision Type Class specifically tailored to image
processing library. This manual provides information on the programming
software.
In both cases – contrary to ProVision users – you require a Microsoft C++
developing platform. Programming your own operating software with "VS 710 OEM
Development Kit" sets higher standards on your system know-how.
ProVision Programming Software for Plug-In Inspection Elements
A5E00105134-01
1-1
921847490.049.png 921847490.051.png 921847490.052.png 921847490.053.png 921847490.054.png 921847490.055.png 921847490.056.png 921847490.057.png
Zgłoś jeśli naruszono regulamin