s Preface, Contents SIMATIC Vision Sensor SIMATIC VS 130-2/VS 130-2vcr Manual Product Overview 1 System Integration 2 Installation 3 Commissioning 4 Operator Input 5 Process Interface 6 Diagnostics 7 Appendix 8 Index Edition 09/2005 A5E00475759-01 Safety Guidelines This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert symbol, notices referring to property damage only have no safety alert symbol. The notices shown below are graded according to the degree of danger. Danger ! indicates that death or severe personal injury will result if proper precautions are not taken. ! indicates that death or severe personal injury may result if proper precautions are not taken. ! Warning Caution with a safety alert symbol indicates that minor personal injury can result if proper precautions are not taken. Caution without a safety alert symbol indicates that property damage can result if proper precautions are not taken. Notice indicates that an unintended result or situation can occur if the corresponding notice is not taken into account. If more than one degree of danger is present, the warning notice representing the highest degree of danger will be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to property damage. Qualified Personnel The device/system may only be set up and used in conjunction with this documentation. Commissioning and operation of a device/system may only be performed by qualified personnel. Within the context of the safety notices in this documentation qualified persons are defined as persons who are authorized to commission, ground and label devices, systems and circuits in accordance with established safety practices and standards. Prescribed 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. Correct, reliable operation of the product requires proper transport, storage, positioning and assembly as well as careful operation and maintenance. Trademarks All names identified by (R) are registered trademarks of the Siemens AG. The remaining trademarks in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owner. Disclaimer of Liability We have reviewed the contents of this publication to ensure consistency with the hardware and software described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information in this publication is reviewed regularly and any necessary corrections are included in subsequent editions. Siemens AG Automation and Drives Postfach 4848 90437 NURNBERG GERMANY Copyright (c) Siemens AG 2005 A5E00475759-01 Siemens AG 2005 Technical data subject to change. Preface Purpose of the Manual This manual describes the vision sensors SIMATIC VS 130-2 and VS 130-2vcr. It helps to install, commission and operate the sensors. The documentation addresses personnel concerned with the engineering, commissioning and service of automation systems and visualization equipment. Guide The manual contains the following guides which provide quick access to the specific information you need: * The manual opens with a complete directory. * The manual closes with a detailed index for quick access to the information you require. Further information An installation and wiring manual is included in paper form. On your CD you will find the "Getting Started" guide for initial commissioning of your SIMATIC VS 130-2 or VS 130-2vcr vision sensor. Further support If you have any questions concerning the use of products which are not answered in this manual, please contact your local Siemens partner at your Siemens office. You can find your local partner at: http://www.siemens.com/automation/partner You can find a guide to the technical documentation on offer for the individual SIMATIC products and systems at: http://www.siemens.de/simatic-tech-doku-portal You can find the catalog and online ordering systems at: http://mall.automation.siemens.com/ Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 iii Preface Training center To help you to learn about the vision sensors SIMATIC VS 130-2 and VS 130-2vcr and the S7 automation system, we provide a range of training courses. Please contact your regional training center or the central training center in Nuremberg, Germany. Telephone: +49 (911) 895-3200. Internet: http://www.sitrain.com Technical support How to reach technical support for all A&D products * With the Support Request form on the Web: http://www.siemens.de/automation/support-request * Telephone: + 49 180 5050 222 * Fax: + 49 180 5050 223 Further information about our technical support is available in the Internet at http://www.siemens.com/automation/service Service & Support on the Internet The Siemens Service & Support team provides you with comprehensive additional information on SIMATIC products in its online Internet services. http://www.siemens.com/automation/service&support There you can find: iv * Current product information and downloads which you may find useful for your product. * The documents you require, using our Service & Support search engine. * A forum where users and experts from all over the world exchange ideas * Your local partner for Automation & Drives. * Information about onsite services, repairs, spare parts. Lots more is available to you on our "Service" pages. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Contents 1 Product Overview 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.7.1 1.7.2 1.7.3 2 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 3 3-1 Installing Components for VS 130-2................................................................. 3-1 Wiring Components .......................................................................................... 3-3 Guidelines on Interference-Proof Installation ................................................... 3-5 Guidelines for Installing PROFIBUS DP or PROFINET I/O ............................. 3-5 Commissioning 4.1 4.2 4.3 4.4 2-1 Design............................................................................................................... 2-1 Application Examples ....................................................................................... 2-2 Reading codes or checking quality in stand-alone mode with output over Ethernet.................................................................................. 2-2 Reading Codes or Quality in Stand-alone Mode with Output over RS-232 ..... 2-3 Reading Codes or Quality in a PROFIBUS Environment................................. 2-4 Reading Codes or Quality in a PROFINET Environment ................................. 2-5 Reading codes or checking quality in a PROFINET environment and outputting over Ethernet ............................................................................ 2-6 Mixed operation ................................................................................................ 2-6 Installation 3.1 3.2 3.3 3.4 4 Product Description .......................................................................................... 1-1 Components ..................................................................................................... 1-4 Processing Configuration.................................................................................. 1-5 Important Requirements for Installation............................................................ 1-6 Applications ...................................................................................................... 1-6 The lamp multiplexer accessory ....................................................................... 1-9 Requirements for Codes and Legibility........................................................... 1-11 What is Required of Data Matrix and Vericodes? .......................................... 1-11 Requirements for QR codes ........................................................................... 1-15 Requirements for PDF417 codes ................................................................... 1-17 System Integration 2.1 2.2 2.2.1 1-1 4-1 Introduction ....................................................................................................... 4-1 Turning on the Device....................................................................................... 4-1 Control and Display Panel ................................................................................ 4-3 Adjusting the Sensor with the Setup Support................................................... 4-5 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 v Contents 5 Operator Input 5.1 5.2 5.3 5.3.1 5.3.2 5.3.3 5.3.4 5.3.5 5.3.6 5.3.7 5.3.8 5.3.9 5.3.10 5.4 5.4.1 5.4.2 5.4.3 5.4.4 5.4.5 6 6.5.3 6.5.4 6.5.5 6.6 6.6.1 6.6.2 6.6.3 7 6-1 Introduction ....................................................................................................... 6-1 Integrating the DP slave VS 130-2 in HW Config............................................. 6-2 Integrating the PROFINET I/O Device VS 130-2 in HW Config ....................... 6-4 Control Via the "DI/DO" I/O Interface ............................................................... 6-6 Control Signals ................................................................................................. 6-6 Selecting the Mode ........................................................................................... 6-7 Control over PROFIBUS DP and PROFINET IO ........................................... 6-11 File Transfer Principle over PROFIBUS DP and PROFINET IO .................... 6-11 Assignments for PROFIBUS DP and PROFINET IO-relevant Interfaces for the Processing Unit ................................................................................... 6-12 Sample program for data exchange if code length <= 27 bytes..................... 6-15 Programming the Data Block.......................................................................... 6-17 FB 79 "VS130-2_CONTROL" ......................................................................... 6-19 Sample Programs ........................................................................................... 6-32 Sample Program for Interfacing the VS 130-2 to a SIMATIC Controller with the Aid of FB79........................................................................................ 6-32 Sample Program for Outputting the Read Code to a PC or PG ..................... 6-33 Sample Program for Archiving Diagnostic Information on a PC or a PG ....... 6-34 Diagnostics 7.1 7.2 7.2.1 7.2.2 7.2.3 7.3 7.3.1 7.3.2 7.4 7.4.1 7.4.2 7.4.3 7.4.4 vi Overview........................................................................................................... 5-1 Working with the Processing Unit..................................................................... 5-1 Working with the Setup Support ..................................................................... 5-26 Starting Setup Support in the Web Browser................................................... 5-28 User interface of the VS 130-2/VS 130-2vcr .................................................. 5-29 Adjust Sensor ................................................................................................. 5-31 Connections.................................................................................................... 5-34 Train................................................................................................................ 5-37 Evaluating ....................................................................................................... 5-39 Options............................................................................................................ 5-40 Info .................................................................................................................. 5-44 Maintain .......................................................................................................... 5-48 Stop.................................................................................................................5-48 Operator Control over Personal Digital Assistant (PDA) ................................ 5-49 Prerequisites................................................................................................... 5-49 Establishing a Connection between PDA and Processing Unit...................... 5-49 Starting or stopping setup support from the PDA........................................... 5-50 User interface of the PDA ............................................................................... 5-50 Known PDA problems..................................................................................... 5-54 Process Interface 6.1 6.2 6.3 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 5-1 7-1 Introduction ....................................................................................................... 7-1 Diagnostics with Messages .............................................................................. 7-1 Error Messages ................................................................................................ 7-2 Warnings/Notes ................................................................................................ 7-7 Read Results .................................................................................................. 7-10 Diagnostics Based on the "BF" LED............................................................... 7-11 "BF" LED with PROFIBUS DP........................................................................ 7-11 "BF" LED with PROFINET IO ......................................................................... 7-11 Slave Diagnostics or I/O Device Diagnostics ................................................. 7-12 Introduction ..................................................................................................... 7-12 Reading Out the Diagnostic Information with S7............................................ 7-12 Diagnostics for PROFIBUS DP ...................................................................... 7-13 Diagnostics for PROFINET IO ........................................................................ 7-15 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Contents 8 Appendix 8.1 8.2 8.3 8.4 8.5 8.6 8.6.1 8.6.2 8.6.3 8-1 Components of the Product .............................................................................. 8-1 Standards and Approvals ................................................................................. 8-6 Installation Dimensions..................................................................................... 8-7 Interface Assignment of the Processing Unit.................................................... 8-9 Calculating the C-mount Lens and the Size of the Field of View for Data Matrix Codes at a Given Distance .................................................... 8-12 Technical Specifications ................................................................................. 8-15 Vision Sensor SIMATIC(R) VS 130-2/VS 130-2vcr .......................................... 8-15 General Specifications.................................................................................... 8-18 Interface Digital Inputs/Outputs ...................................................................... 8-21 Index Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Index-1 vii Contents viii Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 1 Product Overview 1.1 Product Description The Vision Sensor SIMATIC VS 130-2 is a code reader for data matrix codes of the type ECC200 (with the exception of the types "Structured Append" and "Reader Programming Code") and the codes PDF417 and QR (with the exception of the types "ECI Code", "Byte Code", "Kanji Code", "Structured Append" and "FNC1 Code"). The code type is detected during training and adjustment and during training is saved as a code property. The Vision Sensor VS 130-2vcr is Vericode reader. You can use these readers to read the coded labeling of products and then pass the read code to a PLC or a computer. The SIMATIC VS 130-2/VS 130-2vcr operates with overhead lighting. The object is lit from above with the supplied ring flash. With the lamp multiplexer accessory, it is possible to select one of up to 4 lamps for the lighting. The Vision Sensor SIMATIC VS 130-2/VS 130-2vcr is available in the following models: * SIMATIC VS130-2 for large code areas (order number of the full package: 6GF1 130-1BA with 2.5 m cable length and 6GF1 130-1BA01 with 10 m cable length) * SIMATIC VS130-2 for small code areas (order number of the full package: 6GF1 130-2BA with 2.5 m cable length and 6GF1 130-2BA01 with 10 m cable length) * SIMATIC VS130-2 for very small code areas (order number of the full package: 6GF1 130-4BA with 2.5 m cable length and 6GF1 130-4BA01 with 10 m cable length) * SIMATIC VS130-2 for variable code areas (order number of the basic package: 6GF1 130-3BC with 2.5 m cable length and 6GF1 130-3BC01 with 10 m cable length) if you use the C- or CS-mount lenses (includes the high-resolution sensor) * SIMATIC VS130-2 for variable code areas (order number of the basic package: 6GF1 130-3BB with 2.5 m cable length and 6GF1 130-3BB01 at 10 m cable length), if you are using C or CS-mount lenses and want to use the lens protective housing (6GF9 002-7AA01). * SIMATIC VS 130-2vcr (Vericode reader) for variable code areas (order number of the basic package: 6GF1 130-3BB02) Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 1-1 Product Overview Reading, matching or verifying code SIMATIC VS 130-2/VS 130-2vcr can read codes, match the entire code or part of it with a trained code and relate (verify) the quality values of the currently read code to the quality values of a trained code. The entire read character string or only part of it (in other words, filtered) can be output. When it is output, further characters can de appended at the start or end as a prefix or suffix. The SIMATIC VS 130-2/VS 130-2vcr can operate both in standalone mode to make good/bad decisions or as part of a control system to pass on the read codes for further processing. Performance Features * Reliable reading of data matrix codes or Vericodes even under difficult conditions (for example, for oil-smeared or needle-punched codes) * Reading printed or lasered codes of the type PDF417 and QR on a homogeneous background * Overhead ring flash with VS 130-2 * Activation of up to 4 lamps using a special lamp multiplexer * Linking of several trained codes that do not necessarily belong to the same code type to form a code set with the VS 130-2 * It is possible to specify a region of interest with the VS 130-2 * Fully Web-based user interface * When using data matrix codes, up to 20 codes can be read per second * With Vericodes up to 5 code readings per second * Calculating quality characteristics * Extensive operator control and monitoring functions even in the processing mode * Wide-ranging diagnostics and logging functions: Error image memory and event logging * Firmware update over the user interface * Control over digital I/O, trigger signal and also over RS-232 interface of an RS-232 Ethernet converter or TCP server * Acquiring the code without a trigger signal ("Continuous" mode) * Event output over PROFIBUS DP, PROFINET I/O, RS-232 interface of an RS-232 Ethernet converter, and TCP connection to PC You will find the Technical Specifications of SIMATIC VS 130-2/VS 130-2vcr in the appendix. 1-2 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Product Overview Code Properties To improve clarity, the following terms are used in the table below: * Variant 1: SIMATIC VS 130-2 for "large code areas" (6GF1 130-1BA and 6GF1 130-1BA01 with sensor head 6GF2 002-8DA01) * Variant 2: SIMATIC VS 130-2 for "small code areas" (6GF1 130-2BA and 6GF1 130-2BA01 with sensor head 6GF2 002-8EA01) * Variant 3: SIMATIC VS 130-2 for "very small code areas" (6GF1 130-4BA and 6GF1 130-4BA01 with sensor head 6GF2 002-8FA01) * Variant 4: C/CS Mount (6GF1 130-3BB and 6GF1 130-3BB01 with sensor head 6GF2 002-8CB) * Variant 5: C/CS Mount (6GF1 130-3BC and 6GF1 130-3BC01 with sensor head 6GF2 002-8GB) * Variant 6: C/CS Mount (6GF1 130-3BB02 with sensor head 6GF2 002-8CB) for acquiring Vericodes Properties Configuration 1 Configuration 2 Configuration 3 Configuration 4 Configuration 5 and Configuration 6 CCD resolution 0,11 mm/pixel 0,06 mm/pixel 0.032 mm/pixel Image width / 640 pixels Image width / 1024 pixels Minimum dot size 0,6 mm (edge length) 0,35 mm 0,16 mm Image width / 120 pixels Image width / 200 pixels Maximum dot size (edge length) 2 mm 1 mm Image width / 22 pixels Image width / 35 pixels Minimum code 10 *10 dimension (rows * columns) 10 *10 10 *10 10 *10 10 *10 Maximum code 48 *48 dimension (rows * columns) 48 *48 48 *48 72 *72 Clearance 100 mm sensor front edge - test object 90 mm 75 mm Depending on lens Depending on lens 75 mm * 57 mm 45 mm * 34 mm 20 mm * 15 mm depending on lens depending on lens Image field 1) 3,5 mm 1) 72 *72 1) With large code dimensions such as 72*72, make sure that the lens used does not cause any distortion at the edges. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 1-3 Product Overview 1.2 Components The complete Vision Sensor SIMATIC VS 130-2/VS 130-2vcr consists of the following: * Sensor head with CCD sensor chip (CCD = Charge Coupled Device) for sensing the code * LED overhead lighting unit, red, degree of protection IP65 as ring flash (order number 6GF9 004-8BA01; only with VS 130-2) * Processing unit for code processing, output of results, PROFIBUS DP and PROFINET I/O communication and parameter assignment * Cables to connect the individual components * Installation instructions for installing and wiring the SIMATIC VS 130-2/VS 130-2vcr * CD with: - This manual SIMATIC VS 130-2/VS 130-2vcr (German, English, French, Spanish, Italian for VS 130-2, German and English for VS 130-2vcr) - Online help (interfacing the Com Server of W&T, establishing the connection, setup support) - Getting Started - Installation Instructions - Compact Com Server manual from W&T - The installation manual SIMATIC S7-300 Automation System, Hardware and Installation - Getting Started Collection for PROFINET I/O - PROFINET System Manual, System Description - PROFINET IO from PROFIBUS DP to PROFINET IO Programming Manual - PROFINET IO Structure of the Diagnostic Data Records Product Information - The device master data file SIEM8111.GSD and the corresponding bitmap file VS1X0__N.DIB (for PROFIBUS DP) - the GSD file GSDML-V1.0-Siemens-VS130-2-20041021.xml (General Station Description) and the bitmap file vs100.bmp (for PROFINET I/O) - Three sample programs (connecting the VS 130-2 to a SIMATIC controller using FB79, output of the read code to a PC or a PG, archiving diagnostic information on a PC or PG) Overview of the complete package Note If you want to use C or CS-mount sensors under IP65 conditions, use the lens protective housing (6GF9 002-7AA01). 1-4 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Product Overview 1.3 Processing Configuration The objects with the code are fed past the sensor head with a suitable conveyor. They must be located fully within the sensor field of view when being read. In the training mode, the character content of the code is saved. In the processing mode, the current code is read and, if required, compared with the saved content of the trained code. The digital output signals are set according to the read result: READ (code was localized and decoded), MATCH (code matches the trained code), N_OK (code was not legible). The read result is output over PROFIBUS DP, PROFINET IO or over the RS-232 interface of an RS-232 Ethernet interface converter or over a TCP server depending on the parameter settings. Triggering To read the code, you must make sure that the code is completely within in the sensor field of view and clearly visible. The code is captured at the trigger time. In this case, you generate an exact and debounced trigger signal at the trigger time, for example with a laser light barrier. As an alternative, you can record the code without a trigger signal (trigger source "endless"). In this case the code is output again only when there is a code change. This is required, for example, with rotating parts if the exact position of the code is not known. You can check your settings with the setup support of the VS 130-2/VS 130-2vcr. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 1-5 Product Overview 1.4 Important Requirements for Installation The following requirements must be met: * 1.5 The code must be clearly visible: - There should be as few reflections as possible in the code field. - The code field should be uniformly illuminated without shadows. - All parts of the code should be sharply printed. * The sensor can be up to 40 from the vertical. * The distance between the code and the image edge should be at least two dot widths. Applications Below, you will see several examples of data matrix codes, QR, PDF417 and Vericodes: 1-6 * Printed data matrix code * Lasered data matrix code (plastic surface) Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Product Overview * Lasered data matrix code (pcb) * Data matrix code created with inkjet printer * Punched data matrix code * Needle punched data matrix code Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 1-7 Product Overview 1-8 * Printed QR code * Printed PDF417 code * Vericode Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Product Overview 1.6 The lamp multiplexer accessory If there are varying lighting conditions in the vicinity of the sensor head, it is sometimes advisable to work with different lamps at different times. You can therefore connect up to 4 flash lamps to the Vision Sensor VS 130-2/VS 130-2vcr using he lamp multiplexer (6GF9 002-7BA). Note The lamp multiplexer can only be used if you have set the multilight mode. If you not activate the multilight mode, you must connect your lamp directly to the processing unit. The lamp multiplexer is shown in the figure below. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 1-9 Product Overview Connecting the lamp multiplexer You connect to the processing unit as follows: Connect a lighting cable (6GF9 002-8CE) to the LAMP socket of the processing unit and to the input socket LIN. of the lamp multiplexer. Connect each of the maximum four lamps to the lamp multiplexer over a lighting cable. Lamp 1 is assigned to socket L1, lamp 2 to socket L2 etc. Connect the socket connector "DI/DO" of the processing unit to the left-hand plug connector "DI/DO" of the lamp multiplexer with the supplied special cable. You can connect a digital communication cable (6GF9 002-8CB) to the right-hand plug connector "DI/DO". Please remember that you must not then use the MATCH and NOK signals. These are used to select a lamp. Note If you connect the lamp multiplexer with connected lamps to a VS 130-2/VS 130-2vcr while this is operating, this can lead to the processing unit resetting itself in some situations. Installing the lamp multiplexer You have the following installation options: 1-10 * Wall-mounting using the two holes at the upper end of the lamp multiplexer * Installation on a standard rail: In this case, screw the supplied rail adapter to the back of the lamp multiplexer. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Product Overview 1.7 Requirements for Codes and Legibility 1.7.1 What is Required of Data Matrix and Vericodes? General Requirements for Data Matrix and Vericodes to Ensure Readability VS 130-2 can read data matrix codes with properties corresponding to those published in the standard for data matrix codes. In many ways, VS 130-2 reacts tolerantly even when certain basic properties are absent and is capable of dealing with difficulties that are not specified in the standard. As a result, VS 130-2 and VS 130-2vcr have a very wide range of application in normal situations, a fact reflected in the following broad limits: * It can read codes in which directly adjacent code points have a minimum distance of only 5 pixels and up to a maximum distance of 35 pixels. * The deviation of the sensor axis from the vertical can be between 0 und 40 . * The code field can approach the edge of the image up to a distance equivalent to twice the code point diameter. * The dominant polarity of the code points compared with the background is required uniformly for all points (as it was during the training procedure). Slight shadows or shiny areas are tolerated. * The ratio of the distance to the closest neighbor and the diameter of any code point can be between 2 and 0.8. * Although code points must be printed according to a regular square grid pattern, individual points can be displaced from their ideal position by up to 1/3 of the grid unit. Even slight parallelogram-shaped distortion is tolerated. * With large-image but small-dimensioned codes, slight curves in the printed material surface are tolerated. With high-value codes (for example, more than 14 x 14) or a strongly inclined sensor axis, curves are not allowed. * Large tolerance of background disturbances that cannot be described quantitatively * Large tolerance of poor contrast conditions * Due to the limited image resolution, codes with a maximum code dimension of 72x72 can be read. In terms of these limit characteristics and when using minimum read rates due to the requirements of the application (can be set with the "Cycletimelimit" parameter) the tolerances are generally restricted, in some cases in stages, or other conditions come into play. The limits described below are intended mainly as guidelines since the actual conditions in a real application cannot be assessed accurately in advance. It is therefore conceivable that higher read rates can be achieved even if individual conditions are not fully adhered to. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 1-11 Product Overview Processing Method for Reliable Reading of Difficult Data Matrix Codes and Vericodes Settings: * Speed = low * Exposure = Manual or Auto V1 or Auto The self-adapting recognition method of VS 130-2/VS 130-2vcr allows the most difficult codes to be read reliably. The most reliable detection is reached by VS 130-2/VS 130-2vcr when you make adequate time available for adaption by setting a high cycle time limit. The recognition method is designed for a variety of practical situations in which various aspects of the read configuration cannot be considered ideal. For example: * Any alignment and position of the code in the image * Reading codes even when dots overlap or are largely isolated * Reading codes recorded mirror-inverted * Tolerance of distortion, due for example to inclined installation of the image sensor (view angle down to a lower limit of approximately 50 to the printed surface) * Resistant to similar-looking foreign objects in the area of the code * Resistant to interference patterns (grooves, granularity) in the area of the code * Good tolerance of contrast fluctuations * Good range of imaging size from 5 to 35 pixels per dot Rectangular or square codes (with data matrix codes with maximum dimensions of 72 x 72 dots) can be read, whereby the brightness polarity (bright on dark or dark on bright) is unimportant. If individual conditions are particularly favorable and stable in a concrete situation (and therefore less effort is required for internal adaption), the read rate of VS 130-2/VS 130-2vcr can reach a peak of 20 per second. You can influence this by setting the "Speed" and "Cycle time limit" parameters as described below. 1-12 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Product Overview Processing Method for Fast Reading of Data Matrix Codes and Vericodes with a Guaranteed Read Rate up to 5Hz Settings: * Speed = medium * Exposure: - = Manual: guaranteed read rate of 5 Hz - = Auto V1 and Auto: guaranteed read rate of 3.3 Hz These read rates are achieved under the following conditions: * The code dimension must not be greater than 40 x 40 dots. * The code must be positioned so that there is always a clearance of at least 3 dots to the edge of the image. * The code should not make contact with any other objects in the image (keep the quiet zone free!) * To allow the code to be found quickly, there must be no other objects (bus structures count here as well) in the image with enclosed rectangle and of a comparable size to the trained code. (See also the two following figures.) * The minimum dot size is 5 pixels per dot without restrictions. * The view angle must be greater than 70. The following figure shows you an illegal constellation for guaranteed read rates: Two neighboring objects in the image have a rectangular border of a size similar to that of the code. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 1-13 Product Overview The following figure shows you a legal constellation for guaranteed read rates: All neighboring objects are clearly of a different size from the code. In this case, rotation of the code from exposure to exposure would be acceptable since there is no rectangle of another object that is compatible with the largest possible rectangle around the code. Note Operating and monitoring via the setup support can lead to longer cycle times. Processing Method for Fast Reading of Data Matrix Codes with a Guaranteed Read Rate of 20Hz Settings: * Speed = high * Exposure = manual (due to the short processing times, automatic exposure is not possible with this method.) These read rates are achieved under the following conditions: 1-14 * The illumination must be stable enough so that automatic shutter control is not necessary. * The code dimension must not be greater than 20 x 20 dots. * Since the image is recorded "undersampled", the dots of the code must have a minimum size of 10 pixels * The code must be positioned in the sensor image so that there is always a clearance of at least 3 dots to the edge of the image. * The code must not make contact with any other objects in the image, the quiet zone must be kept free. * To allow the code to be found quickly, there must be no other objects (bus structures count here as well) in the image with enclosed rectangle and of a comparable size to the trained code. (See also the two following figures.) * The diameter of the dots must be uniform over the entire code field. The contrast between dots and the background must be approximately the same over the entire code field. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Product Overview * The image background must have a homogeneous brightness (no textures such as stripes or grooves etc.). * The view angle of the sensor to the printed surface must be approaching vertical (80 to 90 degrees). Note Operating and monitoring via the setup support can lead to longer cycle times. 1.7.2 Requirements for QR codes General Requirements for QR Codes and Legibility The requirements are as follows: * It can read codes in which directly adjacent code points have a minimum distance of 5 pixels and up to a maximum distance of 35 pixels. * The view angle of the sensor to the surface must be between 70 and 90 . * The diameter of the dots must be uniform over the entire code field. * The contrast between dots and the background must be approximately the same over the entire code field. * The image background must have a homogeneous brightness (no textures such as stripes or grooves etc.). * The following code types are not supported: Micro QR code, Macro QR code * Due to the limited image resolution, the maximum code dimension 89x89 (for all sensor heads except 6GF2002-8GB) or 133x133 (for sensor head 6GF2002-8GB) can be read. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 1-15 Product Overview Requirements for QR codes for fast reading with guaranteed read rates up to 5 Hz (for all sensor heads except 6GF2002-8GB) * The code dimension must not exceed 37 x 37. * To allow the code to be found quickly, there must be no other objects (bus structures count here as well) in the image with enclosed rectangle and of a comparable size to the trained code. * The code must be positioned in the sensor image so that there is always a clearance of at least 3 dots to the edge of the image. * The code should not make contact with any other objects in the image (keep the quiet zone free: 4 dots). * The dots of the code must have a minimum size of 10 pixels. * The view angle of the sensor to the printed surface must be approaching vertical (80 to 90 ). * The code must not be mirrored compared with the trained code. * The polarity must be the same as in the trained code. * The code must have the same dimension as the trained code. Characteristics of QR code 1-16 * Any alignment of the code in the image * Up to 5 code readings per second * Reading inverted code images * Calculation of quality characteristics according to the AIM specification * Display of the surrounding rectangle around the code position and code mid point * Display of the roll angle and tilt angle Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Product Overview 1.7.3 Requirements for PDF417 codes General Requirements for PDF417 Codes and Legibility The requirements are as follows: * Codes with a bar width of at least 3 pixels and in which the height of a single row of symbols is at least 9 pixels can be read. * The width of the black and white bars must be uniform over the entire code field. * The view angle of the sensor to the surface must be greater than 70 . * The code should not make contact with any other objects in the image (keep the quiet zone free: twice the column width). * Within the code, the ratio of contrast (difference between black and white) to noise should be at least three and should be very similar over the entire code field. * The image background must have a homogeneous brightness (no textures such as stripes or grooves etc.). * The code must be positioned in the sensor image so that the entire code (including start and stop pattern) always has a clearance of at least 3 pixels to the edge of the image. * The error correction codes (the lower part of the bar code) must not be covered. * The following code types are not supported: Truncated PDF417, Macro PDF417, Micro PDF417 * At the minimum bar width, each symbol column requires 51 pixels. Along with the four start and stop patterns, the width of the code with n code columns is: Width = 51 * (n + 4) pixels. Due to the limited image resolution, codes with up to a maximum of 40 code rows and up to a maximum of 6 code columns (for all sensor heads except 6GF2002-8GB) or up to 60 code rows and up to 12 code columns (for sensor head 6GF2002-8GB) can be read. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 1-17 Product Overview Requirements for PDF417 codes for fast reading with guaranteed read rates up to 5 Hz (for all sensor heads except 6GF2002-8GB) * The view angle of the sensor to the printed surface must be approaching vertical (view angle 80 to 90 ). * To allow the code to be found quickly, there must be no other objects (bus structures count here as well) in the image with enclosed rectangle and of a comparable size to the trained code. * The code dimension must not be greater than 20 rows and 2 columns. * The bar width must be at least 6 pixels. * The height of individual symbol rows must be at least 18 pixels. * There must be no disturbances or overlaps within the code. * The PDF417 error correction level must be at least 1. * The polarity must be the same as in the trained code. Characteristics of the PDF417 code 1-18 * Any alignment of the code in the image * Up to 5 code readings per second * Reading inverted code images * Calculating the contrast quality characteristic * Calculating the unused error correction * Display of the surrounding rectangle around the code position and code mid point Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 2 System Integration 2.1 Design Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 2-1 System Integration 2.2 Application Examples 2.2.1 Reading codes or checking quality in stand-alone mode with output over Ethernet VS 130-2/VS 130-2vcr reads the codes and outputs them to a PC/PG. The PC or PG can be connected to the processing unit directly by a crossover cable or over a network connection. 2-2 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 System Integration 2.2.2 Reading Codes or Quality in Stand-alone Mode with Output over RS-232 The code is output over the RS-232 port of the Com server from WuT. The PC or PG for setup support is connected to the processing unit over a network (intranet or Internet). Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 2-3 System Integration 2.2.3 Reading Codes or Quality in a PROFIBUS Environment A PC/PG intended solely for setup is connected over the Ethernet port. Via PROFIBUS, there is a connection to a PLC and to another PC/PG. VS 130-2/VS 130-2vcr is controlled over PROFIBUS by the automation system and the codes output to this automation system or PC/PG once again over PROFIBUS. 2-4 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 System Integration 2.2.4 Reading Codes or Quality in a PROFINET Environment A PC/PG dedicated for setup is connected over the Ethernet (TCP/IP). There is also a connection to a PROFINET-capable automation system over the Ethernet. VS 130-2/VS 130-2vcr is controlled over PROFINET by the automation system. The code is also output over PROFINET to the automation system. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 2-5 System Integration 2.2.5 Reading codes or checking quality in a PROFINET environment and outputting over Ethernet Two PCs or PGs are connected over Ethernet (TCP/IP): * One is used for setup. * The other is used to output the read codes. Note It is also possible to connect only one PC/PG over Ethernet (TCP/IP). In this case, the same machine is used for setup and for code output. A connection to a PROFINET-capable automation system remains over Ethernet. VS 130-2/VS 130-2vcr is controlled over PROFINET by the automation system. 2.2.6 Mixed operation In addition to the connection options listed in the sections Reading Codes or Quality in Stand-alone Mode and over Ethernet to Reading Codes or Checking Quality in a PROFINET Environment and Outputting over Ethernet, mixed modes are also possible, for example control over PROFIBUS DP and result output over RS-232. 2-6 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 3 Installation 3.1 Installing Components for VS 130-2 Step Activity 1A Arrange the sensor head so that reflections are kept to a minimum. The angle of its central axis should be typically 15 from vertical (angle ) (permitted range of angles for data matrix and Vericode: 0 40, for QR and PDF417 code: 0 30). Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 3-1 Installation Step 1b Activity If there is still too much reflection at an angle of 15, select an arrangement in which the sensor head and the ring flash are not concentric. Note: The mechanism for mounting the ring flash is not supplied with the product. If the ring flash does not meet your requirements, please contact your sales partner who will be able to recommend other suppliers of lighting for the VS 130-2C. 1c With both arrangements, maintain a clearance between the end of the sensor head and the code to be read that is suitable for the lens you are using. Caution: 2 3 4 If you have a large code area and the sensor is inclined at a large angle to the code area and there is only a short distance between the sensor and code area, this can lead to image distortion and diminished recognition performance. Install the processing unit so that it is easily accessible for the operator. Install the external triggering unit, for example a light barrier. Start the setup support on the PG/PC, and switch the processing unit to the Adjust mode. You then see an image as seen by the sensor head. * Check the trigger signal. by selecting the "Trg. only" check box in the "Read settings" group of the "Adjust" task. Check whether VS 130-2 can read the codes with the sensor head and ring flash in the current position. If necessary, correct the trigger point and/or position of the sensor head. * Select suitable values for the shutter speed and brightness. The image should not be too bright. Caution: If Exposure is set to Auto V1 or Auto, the code must remain fully in the image for at least 100 ms. As soon as after "Recognition" the message "Successfully finished" appears, the code has been successfully decoded. You will see the result of the read in the "Result" box. 3-2 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Installation 3.2 Wiring Components Connect the processing unit with the other components using the connectors on the front panel. Port Pin Assignment of the Processing Unit Attention Do not connect or disconnect cables when the power supply is on. ! Apart from the Ethernet cable, the cables are supplied with the product (See Components of the Product). Warning Grounding the VS 130-2/VS 130-2vcr cancels the ungrounded installation of the power unit used to operate the VS 130-2/VS 130-2vcr. ! Connector Connector Label Type Number Cable Cross Type of pins Section Functional earth - Screw terminal - - - Power supply IN 24 V DC Circular connector M12 4 0.56 mm2 Pin Illumination Unit LAMP Circular connector M12 4 0.23 mm2 Socket 2 Socket Socket Sensor head (shielded cable) SENSOR HD D-sub * 26 0.09 mm I/O DI/DO D-sub 15 0.14 mm2 PROFIBUS DP DP D-sub 9 - Socket Ethernet Ethernet RJ45 8 - Socket * The supplied ferrite ring must be fixed to the sensor cable (approx. 50 mm from connector to evaluation unit). Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 3-3 Installation Step Activity 1 Read the guidelines for preventing electrical interference (see Guidelines for Preventing Electrical Interference). 2 Connect the processing unit to the sensor head and the lighting unit with the cables. 3 If you do not evaluate the result bits READ, MATCH, N_OK over PROFIBUS DP: Connect the digital outputs READ, MATCH, N_OK as described in Control Signals. 4 Connect the trigger signal via the TRG digital input. 5 If you intend to control the SIMATICVS 130-2/VS 130-2vcr with a PLC, connect the other digital inputs and outputs as described in Control Signals. 6 Connect functional ground of the processing unit to chassis ground (diameter of the ring: (M5, 2 cable cross section 1.5 mm ). 7 Connect the processing unit to the 24 V power supply (2 A). 8 Connect the PC/PG to the processing unit via Ethernet. Note The DC load power supply must meet the following requirements: Only low voltage less than or equal to 24 V DC safely isolated from the power supply network must be used for the load current supply. Safe isolation can be implemented, for example, by adhering to the specifications 1. VDE 0100-410 / HD 384-4-41 S2 / IEC 60364-4-41 (functional low voltage with safe isolation) or 2. VDE 0805 / EN 60950 / IEC 60950 (as safety extra-low voltage SELV) or VDE 0106 Part 101. Note The supply chassis of the I/O and CPU must be connected to the supply chassis of the processing unit. 3-4 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Installation 3.3 Guidelines on Interference-Proof Installation To avoid interference, you must shield your system. Low-frequency (LF) and highfrequency (HF) interference signals can result in an incorrect response if the system is badly grounded or not shielded. Interference signals can be caused, for example, by switching relays or contactors (high rates of change in current or voltage, HF interference signals) or by different ground potentials between two parts of a system (LF interference signals). Using / Installing Interference-Proof Cable * Always use the included patch cord to connect the sensor head. * All plug-in connections must be secured by screws or a locking mechanism. * Signal lines must not run parallel to power cables. A separate cable channel must be used with a minimum clearance of 50 cm from power cables. Note For more detailed information, refer to the installation manual SIMATIC S7-300 Programmable Controller, Hardware and Installation in the section on "Wiring". 3.4 Guidelines for Installing PROFIBUS DP or PROFINET I/O If you are using PROFIBUS DP or PROFINET I/O (to control the device and/or to transfer the results) the installation and configuration guidelines must be kept to. You will find this information in the installation manual SIMATIC S7-300 Programmable Controller, Hardware and Installation. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 3-5 Installation 3-6 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 4 Commissioning 4.1 Introduction You can operate the Vision Sensor SIMATIC VS 130-2/VS 130-2vcr interactively or controlled by signals: * In this chapter, you will learn about interactive operation using the operator control and display field of the evaluation unit. * The section Process interfacing explains the options open to you for signalcontrolled operation. Note The setup support for VS 130-2/VS 130-2vcr is described in detail in the Online Help for Setup Support. 4.2 Turning on the Device Turn on the power on the processing unit. The texts "Booting... SIMATIC V ..." and then "Firmware Version V..." with the current firmware version appear on the display. The VS 130-2 or VS 130-2vcr then runs the following tests: * Test of the sensor head * Test of the stored settings and code data * If applicable, check whether data can be exchanged from and to PROFIBUS (this check is made if you have selected "DP" for one or more of the following signal paths: Output of the result string, feeding the trigger signal to the processing unit, signal path for DISA, SEL0, SEL1, SEL2, SEL3, TRN, RES, IN_OP, TRD, RDY, READ, MATCH, N_OK). * Test of the Ethernet connection * If applicable, check for the connection to PROFINET and to Ethernet RS-232 converter or TCP server and to the PC/PG on which diagnostic information will be stored (over TCP/IP) Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 4-1 Commissioning If there are no errors in the self-test, either the ADJUST menu or the RUN menu or the STOP menu is displayed depending on the status when you last shut down. * "ADJUST" menu: * "RUN" menu: * "STOP" menu level Note Apart from controlling from the processing unit, you can also control VS 130-2/VS 130-2vcr with the setup support, see Operating using the Setup Support. 4-2 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Commissioning 4.3 Control and Display Panel The operator is guided by menus in the display panel. * The menu items appear in the first three lines of the display panel. The cursor ">" points to the selected menu item. * In the fourth line of the display panel, you can see which buttons of the control panel are currently available (OK, ESC, V, W, , ). Using the buttons of the control panel, you can navigate within menus and from one menu to another: - With the arrow buttons "V" and "W", you can move the cursor up and down and select the menu command you require. - With the "OK" button, you confirm your selection and move on to the next step. - With the "ESC" button, you open the previous menu. Description of the LEDs LEDs Function SF Group error POWER Power supply turned on TRAINED Trained: * In Run: from: Selected code has not been trained On: Selected code has been trained * In Training (TRN=1): from: Training active On: Acknowledgment signal (RDY=0) READY Ready: * from: Device startup or SIMATIC VS 130-2/VS 130-2vcr in Stop * On: SIMATIC VS130-2/VS 130-2vcr in run READ Evaluation result: Code was localized and decoded. MATCH Evaluation result: Code matches learned code. N_OK * BF Bus error on PROFIBUS or PROFINET Code was not legible. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 4-3 Commissioning Setting the number values You select the places of a value with the arrow buttons " " and " ". You change the value of a place in the number with the arrow buttons "V" and "W". The speed at which the numeric value changes depends on how long you press the arrow buttons. As soon as you release the arrow buttons, the rate of change returns to the slowest level again. 4-4 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Commissioning 4.4 Adjusting the Sensor with the Setup Support Before you commission the SIMATIC VS 130-2/VS 130-2vcr, you must adjust the sensor head correctly. using a Web-based setup support. You then see an image as seen by the sensor head. For more detailed information on the setup support, refer to the online help. Step Activity 1 1. Switch on the PC or PG with the Internet Explorer. 2. Turn on the processing unit. 3. Establish the TCP/IP connection between the processing unit and the PC/PG. You can either do this directly with a crossover cable or by including the processing unit in an existing network. Both options are described in detail in the online help. 4. Enter the address of the processing unit the Internet Explorer. Result: Once the setup support has started, the sensor field of view is displayed on your PC/PG monitor. The displayed image is updated several times per second. 2 Adjusting the Sensor 1. Bring the code into the image. 2. Set a sharp image by adjusting the distance between the end of the sensor head and the code correctly. 3. Correct the shutter speed and the brightness if necessary or use one of the automatic modes (Auto V1 or Auto). 4. Minimize reflected light by viewing the code at a slight angle. 5. Activate the "Triggered only" check box to test the trigger signal and the trigger settings (trigger source). 6. Tune further settings as required. Note: If you have too many errors, clean the lens and diffuser with a lint-free cloth. 3 * Secure the sensor and then check the correct sensor position. 4 * Make other parameter settings. 5 * Check the read result. 6 * Set the parameters to specify the process interface. 7 * Train the codes, if already known. 8 * Change to the processing mode (RUN). 9 Analyze any errors that may occur. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 4-5 Commissioning 4-6 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5 Operator Input 5.1 Overview There are two basic ways of controlling the VS 130-2/VS 130-2vcr: * Using the Setup Support * Using the Processing Unit With a few exceptions, you can set all the parameters with either method. This is illustrated based on the example of the "IP Mode" parameter: 5.2 * In the setup support, you will find this parameter in the "Connections" task in the "Interfaces" tab in the "Ethernet" group in the "IP Mode" drop-down list box. * On the processing unit, it is available at the ADJUST menu level (Connect > Ports > Ethernet > IP Mode). Working with the Processing Unit The display of the processing unit is used to display the currently read code and to navigate through the menus and make entries. Example of the display of a code: C 01 RUN =SERIES 7 OK:Menu Note In processing mode, it is not the currently read code that is displayed on the processing unit when verifying but the string "Verifying=" followed by 4 quality grades. These belong to the following quality characteristics: 1. Grade belongs to the quality characteristic symbol contrast, 2. grade belongs to the quality characteristic print growth, 3. grade belongs to the quality characteristic axial nonuniformity, 4. grade belongs to the quality characteristic unused error correction. There are three menu levels: * RUN * Adjust * STOP Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-1 Operator Input The following table contains the menus of the RUN menu level. Menu Meaning Code STOP Info ResetStat Select the code number Processing and change to the STOP menu level Information function Reset all statistical information (identical parameter to ResetStat in the Options>Decode menu) Unless a temporary PROFIBUS DP or PROFINET IO error has occurred (see Error Messages), the "Info" menu appears as follows: 5-2 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input If one or more PROFIBUS DP or PROFINET IO errors have occurred (see Error Messages), the "Info" menu appears as follows: Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-3 Operator Input The following table lists the menus of the ADJUST menu level. Menu Meaning STOP Exits the ADJUST menu level If you have made changes in the Adjust menu, you can save or discard them. The processing unit changes to the STOP mode. Adapt (only with Exposure = Manual) exposure adaptation Trigger Trg.only An image is captured only on the trigger signal. Auto (default) The images are acquired continuously. Delay Distort LightSrc. Specification of a maximum speed: Time by which the trigger signal will be delayed (identical parameter to Delay in the Options>Integrate>Trigger menu) Default: 0 ms Correction of the image distortion caused by the lens Default: * Sensor head 6GF2 002-8DA01: 130 * Sensor head 6GF2 002-8EA01: 50 * Sensor head 6GF2 002-8FA01: 0 * Sensor head 6GF2 002-8CB: 0 * Sensor head 6GF2 002-8GB: 0 Specifies a light source (only in multilight mode) The menus of the STOP menu level are listed in the following table. 5-4 Menu Meaning Adjust Changes to the setup mode Connect Sets global connection parameters (interfaces, integration, result string) Train Train a code RUN Start evaluation of a code Options Sets global device parameters (decoding, illumination and image capture, diagnostics) Maintain Delete trained codes and reset all parameters to their default values Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input The following four schematics provide you with an overview of all the parameters of the VS 130-2 that can be set in the Connect and Options menus. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-5 Operator Input 5-6 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-7 Operator Input 5-8 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input The following three schematics provide you with an overview of all the parameters of the VS 130-2vcr that can be set in the Connect and Options menus. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-9 Operator Input 5-10 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-11 Operator Input The following table describes all the parameters of the Connect menu. Parameter Ports Pulsetime Address (not active, if IP Mode = PNIO) (only for VS 130-2) Timeout (not active, if IP Mode = PNIO) (only for VS 130-2) Pulsetime (not active, if IP Mode = PNIO) (only for VS 130-2) Swap (not active, if IP Mode = PNIO) (only for VS 130-2) Devname (not active, if IP Mode = PNIO) (only for VS 130-2) Path Default setting Meaning Ports>DI/DO 5 to 999 30 Ports>DP 1 to 125 7 Pulse time of the digital outputs READ, MATCH, N_OK in ms on the DI/DO interface Address on PROFIBUS DP Ports>DP 100 to 2000 500 Handshake monitoring time in ms Ports>DP 5 to 999 30 Pulse time of the digital outputs READ, MATCH, N_OK in ms when output is over PROFIBUS DP Ports>DP S7, No S7 Specifies the byte order for data types with a width of 16 bits or more: 1. S7: big endian 2. No: little endian Ports>PNIO String (0 to 9, A VS 130-2 to Z, a to z, ".", "-"). The string must match the conventions of the domain name system. 100 to 2000 500 Timeout Ports>PNIO (not active, if IP Mode = PNIO) (only for VS 130-2) Pulsetime Ports>PNIO (not active, if IP Mode = PNIO) (only for VS 130-2) 5-12 Possible Values 5 to 999 30 Name of the device on PROFINET Note: PROFINET is not case sensitive Handshake monitoring time in ms Pulse time of the digital outputs READ, MATCH, N_OK in ms when output is over PROFIBUS I/O Note: For the pulse time, select a higher value than for the update time of the PROFINET IO system in HW Config. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input Parameter Path Swap Ports>PNIO (not active, if IP Mode = PNIO) (only for VS 130-2) IP mode Ports>Ethernet IPAddress Ports>Ethernet (not modifiable, if IP Mode = DHCP) IP Mask Ports>Ethernet (not active, if IP Mode = DHCP) Gateway Ports>Ethernet (not active, if IP Mode = DHCP) MAC Info Ports>Ethernet Possible Values Default setting Meaning S7 no S7 Specifies the byte order for data types with a width of 16 bits or more: * S7: big endian * No: little endian DHCP Manual DHCPSERV PNIO (only for VS 130-2) DHCP Assignment of the IP address to the processing unit in the network: * DHCP: Automatic (DHCP = Dynamic Host Configuration Protocol) * Manual: Manual * DHCPSERV: The processing unit can assign an IP address to a PC connected by a crossover cable if the PC obtains its IP address automatically (DHCP client). * PNIO: Automatic by the I/O controller IP address of the processing unit (An IP address consists of four numbers separated by periods with each number being in a range from 0 to 255.) The subnet mask indicates which part of the IP address specifies the network and which part specifies the processing unit: For xxx.yyy, binary requires that the left part be made up of ones without a gap and the right part be made up of zeros without a gap. Example: 11111111.10100000 is not permitted. Note also: yyy <= 254 IP Address: IP address of the network node that can establish connections outside of the current subnet xxx.xxx.xxx.xxx 192.168.0.42 (xxx=0 to 255) 255.255.xxx.yyy 255.255.255.0 xxx.xxx.xxx.xxx 192.168.000.255 (xxx=0 to 255) Cannot be modified Devicedependent IPAddress Ports> TCP/RS-232 xxx.xxx.xxx.xxx 192.168.000.043 (xxx=0 to 255) IP Port Ports> TCP/RS-232 device-specific Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 8000 The MAC address (Media Access Control) is the hardware address of each network device and is used to identify the device uniquely in the network. IP address of the Ethernet RS-232 converter or of the PC/PG on which a TCP server runs. RS-232 port of the Ethernet RS-232 converter or IP port of the PC/PG on which a TCP server runs 5-13 Operator Input Parameter Path Possible Values Default setting Meaning * Timeout Ports> TCP/RS-232 0 to 3600 0 IPAddress (only for VS 130-2) Port (only for VS 130-2) Timeout (only for VS 130-2) Ports> Arch/MMI xxx.xxx.xxx.xxx 192.168.000.045 (xxx=0 to 255) 0: There is no transfer of cyclic monitoring frames to determine whether the connection still exists between the processing unit and the Ethernet RS-232 converter or the PC/PG on which a TCP server runs. * Otherwise: Time in seconds after which a monitoring frame is sent to determine whether the connection still exists between the processing unit and the Ethernet RS-232 converter or the PC/PG on which a TCP server runs. The check is implemented by sending the "Idling string" ("Connections" dialog "Part 3/3. Result and String") to the recipient at the intervals set with the parameter. If the check fails, an error is output (only when the processing unit is in RUN or Train) and the connection is reestablished. IP address of the server for diagnostic information Ports> Arch/MMI Device-specific 8765 Corresponding port of this server Ports> Arch/MMI 0 to 3600 * 10 * 5-14 0: There is no transfer of cyclic monitoring frames to check the connection between processing unit and server. Otherwise: Time in seconds after which a monitoring frame is sent to check the connection between processing unit and server. If the server does not respond to this frame within the monitoring time, an error is output (only when the processing unit is in RUN or Train) and the connection is reestablished. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input Parameter Integrate Source Path Possible Values Default setting Integrate> Trigger Endless DI/DO DP or PNIO (only for VS 130-2) TCP/RS-232 ASCII characters DI/DO Here, you set the port over which the trigger signal is sent to the processing unit. M If the string specified here is sent over the RS-232 port of an RS-232 Ethernet converter or a TCP server, the processing unit generates a trigger signal. Here, you specify the time by which the trigger signal will be delayed in ms (Identical parameter to Delay in the Adjust menu). Here, you enter the port over which the result string is output. String (only if Source= TCP/RS232) Delay Integrate> Trigger Integrate> Trigger 0 to 9999 ms 0 ms String Integrate None Result Integrate Control Integrate DiagImage (only for VS 130-2) DiagReport (only for VS 130-2) Integrate DP or PNIO (only for VS 130-2) TCP/RS-232 None DP or PNIO (only for VS 130-2) DI/DO None DP or PNIO (only for VS 130-2) DI/DO None Arch/MMI Integrate None Arch/MMI Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Meaning DI/DO Here, you specify the port over which the result bits OK, N_OK, READ, and MATCH are output. DI/DO Here you specify the port for the DISA, SEL0, SEL1, SEL2, SEL3, TRN, RES, IN_OP, TRD, RDY signals. Here, you specify whether the currently captured image will be sent to a server when an error occurs. Here, you specify whether the corresponding data record will be sent to a server when an error occurs. None None 5-15 Operator Input Parameter String option StartPos (only if String> Filter >Option= Position) Length (only if String> Filter >Option= Position) Separator (only if String> Filter> Option=ID) ID (only if String> Filter> Option=ID) 5-16 Path Possible Values Default setting Meaning * String>Filter Off Position ID Off Off: No character in the read codes is suppressed. Nor are any characters added. * Position: Only part of the string of the read codes is taken into account. You specify this part with the StartPos and Length parameters. * ID : Only parts of the string of the read codes are taken into account. You specify which parts using the Separator and ID parameters. Position, starting at which the characters of a part string are output. String>Filter >=1 1 String>Filter >=1 1 The part string consists of as many characters as you specify here. String>Filter ASCII characters + Separators String>Filter ASCII characters - The substring start is identified by the ID. If several sequences are identified by the ID, only the first one is used. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input Parameter Path Possible Values Default setting Format String See "Meaning" %s ReadErr String> Messages See "Meaning" Read Err (%s) FilterErr String> Messages Freely Filter error selectable character string Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Meaning Content and format of the string to be output The string can be a maximum of 100 bytes long and consists of any combination of the following elements: * Characters whose ASCII equivalent is between 01H and FFH (%% causes a percentage character to be displayed) * Formatting instructions for output of variables A formatting instruction has the following structure: % [number of places] variable {selection of variables} Here, square brackets mean the information is optional Braces mean that the exactly one value must be selected from within the braces The following formatting instructions are possible: * %s * %[03]q{0|1|2|3} * %Q{0|1|2|3|4} * %[03]p{0|1|2} * %[{04|05}]c * %u * %U * %l Content and format of the string to be output with read errors The string can be a maximum of 100 bytes long and consists of any combination of the following elements: * Characters whose ASCII equivalent is between 01H and FFH (%% causes a percentage character to be displayed) * Formatting instructions for output of variables The following formatting instructions are possible: * %s * %c "%s" stands for the textual description of the probable cause of the error in English, "%c" for a decimal number with the same information Text for the situation when the values for StartPos or ID for the current part do not occur in the read code 5-17 Operator Input Parameter Path Possible Values Default setting Meaning MatchErr String> Messages See "Meaning" Match error (%s) Content and format of the string to be output with a match error The string can be a maximum of 100 bytes long and consists of any combination of the following elements: * Characters whose ASCII equivalent is between 01H and FFH (%% causes a percentage character to be displayed) * Formatting instruction for output of variables The following formatting instruction is possible: * %s (result string) FormatErr String> Messages Freely selectable character string Format error Text for errors occurring in the "Format" parameter Idle Str. String Freely selectable character string \r\n String to determine whether the connection still exists between the processing unit and the Ethernet RS232 converter or the PC/PG on which a TCP server runs. It is transferred cyclically. Select this so that it can be clearly distinguished from the result string by the recipient. The string can be a maximum of 100 bytes long. 5-18 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input The following table describes all the parameters of the Options menu. Parameter Path Possible Values Default setting Meaning Decode ResetStat Decode - - Resets all the statistical information (identical parameter to ResetStat in the RUN menu) Task Decode Read Match Verify READ Here, you set the task you want to execute with VS 130-2/VS 130-2vcr: MATCH (only if Decode> Task= Match) Decode> Match> Option All Position ID All * Read: Read codes * Match: Compare the entire code or parts of it with a trained code * Verify: The quality values of the currently read code to which the quality codes of a trained code relate * All: All the characters of the codes are compared with all the characters of the trained code. * Position: The string resulting from "StartPos" and "Length" is compared. * ID : The string resulting from "Separator" and "ID" is compared. Speed Decode High Medium Low Low Here, you specify the processing method and duration of decoding. StartPos Decode> Match >=1 1 The first character from the reference string is entered here. Decode> Match >=1 1 The length of the reference string is entered here. Decode> Match ASCII characters + The substring extends as far as the first separator from the "Separators" input box to occur or to the end of the code if there are no separators from the "Separators" box. Decode> Match ASCII characters - Here, you enter the Match ID with which the part string will be started. (only if Decode> Task=Match and Decode> Match> Option> Match= Position) Length (only if Decode> Task=Match and Decode> Match> Option> Match= Position) Separator (only if Decode> Task=Match and Decode> Match> Option> Match=ID) ID (only if Decode> Task=Match and Decode> Match> Option> Match=ID) Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-19 Operator Input Parameter Path Possible Values Default setting Meaning Cycletime Decode 30 (75 with highresolution sensor) to 9999 ms 2000 ms Here, you enter the upper limit for the processing time. VCompress (only for VS 130-2vcr) Decode None, Numeric, Alphanum None Here, you set the character set that was used in the Vericode to be read, to allow data compression if necessary: * None: Maximum character set Every character requires 8 bits. * Alphanum: Only upper case letters, numbers and a few special characters are used. Every character requires 6 bits. * Numeric: Only numbers are used. Every character requires 4 bits. Key (only if Decode Decode> >License >Demo VLicense =Off) (only for VS 130-2vcr) Cannot be modified Devicedependent Displays the license key (8 hexadecimal numbers) Check (only for VS 130-2vcr) Valid, Invalid - Displays the status of the license key. Decode> VLicense * Valid: Valid Vericode license * Invalid: Invalid Vericode license LIGHT Type LIGHT IR Red Other Red Exposure LIGHT Manual Auto Auto V1 Auto Shutter Here, you enter the type of illumination being used. Here, you set the shutter control: * Manual: Manual * Auto: Automatic * Auto V1: Automatic as in VS 130-2 V1.x (compatibility mode) LIGHT 1 to 20000 s 200 s Enter the shutter speed of the sensor in s. LIGHT 10 to 500 200 Here, you set the brightness. LIGHT 5 to 20000 10 000 Upper limit for the shutter speed of the sensor in s (only when Exposure= Manual) Brightness (only when Exposure= Manual) MaxShutt. (only when Exposure= Auto) 5-20 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input Parameter MaxBright (only when Exposure= Path Possible Values Default setting Meaning LIGHT 10 to 500 500 Upper limit for the brightness LIGHT -10000 to 10000 s 0 s Enter the value here by which the automatically calculated shutter time will be changed. Auto) ShuttOff (for VS 130-2vcr: only when Exposure= Auto for VS 130-2: only when Exposure= Auto and ShuttOffFlag= On) Note: The maximum exposure time is not exceeded. Diagnostics Buffer Diagnose> Ring, Stack Logging> Images Ring * Type of image buffer:* * Ring: When the buffer contains 50 entries, entries 1,2 ... are overwritten. * Stack: When the buffer contains 50 entries, no further entries are made. Reasons Diagnose> Trigger, NOK, N_OK, Read und Here, you specify what causes an Logging> Read, Match, Train image to be saved. Images No Match, Train Record Diagnose> Image, +/- 1 Logging> Image Images Image * Image: If one or more of the causes listed above occurs, the current image is saved. * +/- 1 Image: Not only the current image but also the previous and next image are saved. Save Next (only for VS 130-2) Diagnose> On, Off Logging> Images Off * On: The image belonging to the next NOK event is saved permanently in the EPROM. Buffer Diagnose> Ring, Stack Logging> Report Ring * Ring: When the diagnostic buffer contains 15000 entries, entries 1,2 ... are overwritten. * Stack: When the diagnostic buffer contains 15000 entries, no further entries are made. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-21 Operator Input Parameter Save Next (only for VS 130-2) Path Possible Values Diagnose> On, Off Logging> Report> Permanent Default setting Off Meaning As soon as the function is enabled, as many diagnostic entries as you specify in "Entries" are saved in the EPROM. Existing entries are deleted when you switch over to On. If the diagnostic buffer in the EPROM reaches the number of permanently storable diagnostic data records, no further entries are made. Note: Deleting takes several seconds. Entries (only for VS 130-2) Diagnose> 10 to 2000 Logging> Report> Permanent 2000 Number diagnostic data records that can be stored on the EPROM Clear (only for VS 130-2) Diagnose> Logging> Report> Permanent - Delete all the diagnostic entries stored on the EPROM Timebase Diagnose> PC, SNTP Logging PC/ SNTP IP Diagnose> xxx.xxx.xxx.xxx 192.168.000.044 IP address of the SNTP server Logging (xxx=0 to 255) (Only when Timebase= SNTP) Update Diagnose> On Monitor Off Note: Deleting takes several seconds. On Here, you specify the source for the time stamp of the diagnostic events. Here, you specify whether images and the events are saved in processing mode and whether a live image is displayed: * On: Images and events are saved, live image * Off: Images and events are not saved, no live image On: Mode in which you specify the lamp to be used for lighting. In this mode, the result bits cannot be output over the DI/DO interface. The information on which lamp to use is stored along with the code data. When reading without previous training (Code number=Auto), the lamp currently set in the parameters will be used. Extras (only for VS 130-2) Multi Extras> Light On, Off Off * LightSrc. Extras> Light Lamp1, ... Lamp4 Lamp1 Default lamp to be used for the image capture (Only if Multi= On) 5-22 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input Parameter Use ROI (only if Exposure= Auto) ShuttOff (only if Exposure= Auto) Multicode Set 1, ... Set 14 Path Extras> Light Extras> Light Extras Extras> Codesets (only if Multicode= On) Possible Values On, Off On, Off On, Off Default setting Off On Off Multiple Code set n selection of contains only codes 1 to 14 code n (maximum 5) Meaning * On: In automatic shutter control, to calculate the optimum lighting parameters, not the entire image area but only the selected region of interest is used. * Off: In automatic shutter control, to calculate the optimum lighting parameters, the entire image area is used. ShuttOff-Flag: * On: The automatically calculated shutter speed is corrected by the ShuttOff value. * Off: . The automatically calculated shutter speed is not corrected. * On: Mode in which several images are captured and processed per trigger. You specify how many images are captured and the trained codes with which they are compared using the "Code sets" parameter. * Off: Mode in which exactly one image is captured and processed per trigger. From the currently active code set, the processing unit takes the information on the settings for acquiring the images on the first trigger and the trained codes with which they will be compared. (If a code set contains n images, n images will be acquired in succession.) Note: At each further trigger, the processing unit starts at the image of the code that was last read successfully. If no code can be read, the current decoding order is maintained. Use ROI Extras> SpeedUp On, Off Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Off * On: During image processing, the processing unit does not use the entire image area but only the selected region of interest (ROI). * Off: During image processing, the processing unit uses the entire image area 5-23 Operator Input Parameter Polarity Dimension View Filter Path Extras> SpeedUp Extras> SpeedUp Extras> SpeedUp Extras> SpeedUp Possible Values trained, dynamic trained, dynamic trained, dynamic trained, dynamic Default setting Dynamic trained Dynamic trained Meaning Polarity (data matrix codes only): * trained: The processing unit does not check whether bright and dark dots are swapped over in the read code compared with the trained code. * dynamic: The processing unit checks whether bright and dark dots are swapped over in the read code compared with the trained code. Number of dots (data matrix codes only): * trained: The processing unit does not decode the read code if the number of dots is different from the trained code. * dynamic: The processing unit decodes the trained code even if the number of dots is different from the trained code. Reflection (data matrix codes only): * trained: The processing unit does not check whether the read code is mirrored compared with the trained code. * dynamic: The processing unit checks whether the read code is mirrored compared with the trained code. * trained: The processing unit does not use all filter adaption options and therefore achieves a read result faster (including NOK). * dynamic: This setting improves reading reliability with particularly bad code qualities, for example on metallic surfaces. This parameter has no effect on PDF417 code. First Extras> DMC, QR, SpeedUp> PDF417 Sequence DMC Code type that the processing unit first tries to decode when training, when reading without prior training and during setup. Second Extras> DMC, QR, SpeedUp> PDF417, Sequence None None Code type that the processing unit tries to decode second when training, when reading without prior training and during setup. 5-24 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input Parameter Path Possible Values Default setting Meaning Third Extras> DMC, QR, SpeedUp> PDF417, Sequence None None Code type that the processing unit tries to decode third when training, when reading without prior training and during setup. Left Extras> ROI 0,0 % to 70,0 % 5,0 % Left edge of the region of interest (specified relative to the width of the acquired image) Extras> ROI 30,0 % to 100,0 % 90,0 % Width of the region of interest (relative to the width of the acquired image) Extras> ROI 0,0 % to 70,0 % 5,0 % Upper edge of the region of interest (specified relative to the height of the acquired image) Extras> ROI 30,0 % to 100,0 % 90,0 % Height of the region of interest (relative to the height of the acquired image) (only if Use ROI= On) Width (only if Use ROI= On) Top (only if Use ROI= On) Height (only if Use ROI= On) Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-25 Operator Input 5.3 Working with the Setup Support To make use of the setup support of SIMATIC VS 130-2/VS 130-2vcr, the following requirements must be met: * PC/PG with the Microsoft Windows XP Professional operating system with Internet Explorer 6.0 and Microsoft Java VM or Sun Java VM (see also www.java.sun.com/J2SE) version J2SE 1.3.1 or J2SE 1.4.2_06 or J2SE 5.0 * Intel or compatible processor, minimum Pentium 133 MHz * Graphics card/monitor with at least 65536 colors and a resolution of at least 640*480 pixels(The pages of the setup support are optimized for 65536 colors and a resolution of 1024*768 pixels.) * Ethernet port with up to 100 Mbps (protocol: TCP/IP) To work with the setup support on the processing unit, you must establish a connection from your Web browser (for example Internet Explorer) for setup support. How to establish a connection is described in detail in the online help in Establishing Connections. Note The online help is available on the CD. This ensures that you can refer to the information even without the setup support (i.e. offline). 5-26 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input As an example, you can see the "Adjust Sensor" dialog below. Note If the DISA bit is set, in other words, when VS 130-2/VS 130-2vcr is controlled by a programmable controller, you must log on at the processing unit as follows: 1. Make sure that only one PC accesses the processing unit (red lock with green D). 2. Place the mouse pointer on the currently logged-on user (top right) and click. This brings you to the "Options Part 3/4: Security". 3. Log on as a user ("User1" or "Service") who is allowed to take control of the VS 130-2/VS 130-2vcr ("Take control" check box selected). Remember, however, that logging on accesses control of the VS 130-2/VS 130-2vcr by the programmable controller (only relevant for functions that require the DISA bit, for example, change codes and train code). Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-27 Operator Input 5.3.1 Starting Setup Support in the Web Browser If the connection between PC/PG and processing unit is established, you can access the setup support by starting the Internet Explorer and entering the IP address of the processing unit in the "Address" input box and calling it with "Enter". The startup page of the setup support appears in the Internet Explorer: The VS 130-2/VS 130-2vcr automatically blocks operator control on the processing unit. The following message appears on the display of the VS 130-2/VS 130-2vcr: "Settings controlled by Web" (depending on the mode a different text is displayed instead of "Settings"). With "Adjust Sensor", you display the user interface of the VS 130-2/VS 130-2vcr. If the processing unit is currently running a self-test, the "Self-test" page opens instead of the user interface. The index finger symbol and the "active" ">" symbols indicate which step of the self-test is currently being performed. At the same time you will also see a text with information on the current step in the lower part of the page. This also explains the meaning of the buttons you can use to intervene in the self-test. 5-28 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input 5.3.2 User interface of the VS 130-2/VS 130-2vcr When you open the user interface, the page opens that corresponds to the current operating state of the processing unit. If, for example, the processing unit is in Stop mode, the page below opens: Task At the left-hand edge of the user interface, you will see the list of jobs in the form of buttons. The appropriate job is activated depending on the previous operating state of the processing unit. You can change between jobs using the buttons. Traffic Light Below the buttons, there is a traffic light with which you can see the operating state of the processing unit at a glance. The traffic light can have the following states: * Green: Processing mode with output of the result string * Yellow: STOP including adjustment and training * Red: Fault Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-29 Operator Input Error Display If an error occurs, the traffic light changes to red and the corresponding error message, the meaning of the error and ways to eliminate the error are displayed. In "Error output" in the online help, you will find a list with the meaning of the error messages and instructions on how to remedy the problem. Acknowledge the error by clicking the "Acknowledge" button. By acknowledging the error, the user interface can change automatically to the current status of the processing unit after the error has been eliminated. Changing the language setting At the bottom left, you will see a drop-down list box for language selection. You can change the language setting for the entire user interface at any time. WEB At the upper right, you can see the currently logged-on user. By clicking on the user name, you open the "Options Part 3/5: Security". Help At the bottom right, you will see a "Help" button with which you can call up online help at any time. The relevant help text of the online help opens depending on the currently open dialog. 5-30 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input 5.3.3 Adjust Sensor In this dialog, you make the settings for the correct adjustment of the sensor head. Instructions At the top left of the dialog, a static text is displayed providing brief instructions on adjusting the sensor. Current image If "Recognition" is set, the status of image recognition is displayed: * "Successfully finished" in blue text if the currently read code could be decoded Only the images that the VS 130-2/VS130-2vc is attempting to process are displayed. The images are displayed with a green border (indicates detected code). The results box, the display of the minimum dot distance, and the boxes with the five poorest quality characteristics are enabled. The last image process and the results string remain displayed until the processing unit sends the next results string or the recognition status changes to "Running". * "Running" in red text if the currently read code could not be decoded at the first attempt. In this case, VS 130-2/VS 130-2vcr makes further attempts to decode (relearn). The images are displayed without a border. The results box, the display of the minimum dot distance, the boxes with the five poorest quality characteristics, and the corresponding labels are grayed out. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-31 Operator Input Read Settings Here, you enter the parameters for image processing. The possible values and the meaning of the parameters are described in the online help. You can open the online help with the "Help" button (bottom right in the dialog). With the "Freeze/Edit ROI" button or "Live Image" button, you can perform the following actions: * Change the region of interest The region of interest is the area in which the VS 130-2/VS 130-2vcr reads data such as data matrix codes. In the preview, this area is displayed with a red box if "Speedup" "Use ROI" = On is activated in Part 5 of the "Options" dialog or Exposure = Auto and Autom. Exposure >Use ROI = On is activated. If you click on the Freeze/Edit ROI button, the image is frozen and you can adapt the size of the region of interest in the preview. * Freezing the current image You can freeze the current image if the region of interest is not used and no live image is displayed. * Displaying the live image. Note The labeling changes depending on what you activated and the labeling matches the job you change to. Image display Below the image display, there is a diskette symbol with which you can capture an image with the VS 130-2/VS 130-2vcr and save the image in BMP format. The following elements are displayed to the right of the image display: * Green symbol on black background: Sign of life for the connection between setup support and the sensor. The green symbol is of variable size. * Display of the dot size (not for PDF417 codes): Display of the smallest and largest possible dots that can be decoded with the existing equipment. * "Full size" check box A horizontal and vertical scrollbar is displayed at the lower edge of the image. * "Current image": The consecutive number of the currently displayed image is displayed. Result If a code was successfully decoded, the last read code or the modified result string is displayed in the result field in the image preview. If the code could not be decoded, this box is grayed out. 5-32 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input Quality / Grade / Value If a code was correctly read (Recognition: "successfully finished"), the quality characteristics that caused the most problems in reading the code with the current setup are displayed here. By eliminating these problems, you can improve the read reliability of the VS 130-2/VS 130-2vcr. The quality grade has the range of values A, B, C, D, F, where A is the best and F the poorest quality The displayed characteristics are shown in the following colors: * Petrol for grade A * Cyan for grades B, C or D * Red for grade F You will find descriptions of the quality characteristics and the corresponding value ranges in the online help that you can call with the "Help" button. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-33 Operator Input 5.3.4 Connections The Connections dialog is made up of the following three parts: 5-34 * Part 1/3: Ports * Part 2/3: Integration * Part 3/3: Result & String Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input Part 1/3: Ports Here, you either specify or set parameters for the ports. Part 1/3: Ports includes the following group fields: * Ethernet Here, you set the parameters for the Ethernet port. * PROFINET IO Here, you set the parameters for the PROFINET IO port. These input boxes are enabled when you select "PROFINET mode" in the "IP Mode" drop-down list box. * DI/DO Here, you set the switching duration of the digital outputs READ, MATCH, N_OK. * PROFIBUS DP Here, you set the parameters for the PROFIBUS DP port. These input boxes are enabled when you select "DHCP" or "Manual" or "DHCP Server" in the "IP Mode" drop-down list box. * TCP/RS-232 Here, you set the parameters for an Ethernet RS-232 converter connected to the Ethernet port of the processing unit or for the PC/PG on which the TCP server runs. * Archiving/MMI Here, you specify the address of a server to which you send images and / or data records for diagnostics and a monitoring time after which connection establishment is checked again to determine whether the connection exists between the processing unit and server following a failed connection establishment. Note You will find a detailed description of the parameters the possible values in the online help that you can call with the "Help" button. With the "Next" button, you change to the next part of the "Connections" dialog. The "Apply" button is enabled only when you have changed settings. When you click on one of these buttons, all the parameters of the current dialog are saved. The dialog remains open. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-35 Operator Input Part 2/3: Integration Here, you specify the path over which signals are sent to the processing unit and over which path the result string is output. You will find a detailed description of the possible settings in the online help that you can call with the "Help" button. Note You cannot set every combination of settings for String, Result and Control. If a combination is not permitted, (for example Text = PROFIBUS DP and Control = DI/DO), an error message to this effect is displayed in the lower part of the dialog. Part 3/3: Result & String Here, you specify whether and how result string or filtered text sections, quality values, positions etc. are output over the RS-232 port of an Ethernet RS-232 converter or over DP or to a TCP server. You can also specify which text appears on the display of the processing unit if an error occurs. In the "Result String" group box, you specify whether all characters of the read code are output or only a substring (according to the filter settings of ID or Position). With the "Format string" input box, you can also specify the content and the format of the string to be output. How to make these settings is described in the online help that you can call with the "Help" button. In the "Error messages" group box, you specify which text is output on the display of the processing unit and over Ethernet or DP if the relevant error occurs. You can select any string to be output by entering the required text in the relevant input box. 5-36 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input 5.3.5 Train If you want to compare read codes with each other or use the VS 130-2/VS 130-2vcr for quality control, you can train codes that can be used for a comparison. The last transferred image is displayed in the preview. With the diskette symbol, you can save the current image in BMP format. "Use this image" Option Button If this option is selected, the currently displayed image will be used for code training. The preview only shows the image last acquired when the check box was activated. If this option is not selected, the next triggered image will be used for code training after you click the "Start Training" button. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-37 Operator Input "Start Training" Button Clicking this button starts the training of the code. After successful training, you move on to Part 2 of the dialog "Train Code". The following is displayed in this dialog: * The image of the acquired code * Below this, the result in the form of a string and * The exposure time, brightness and quality of the code (quality grade from A = best quality to F = worst quality). To save the code, enter a number between 1 and 14 in "Code number" and click "Save". Under "Saved codes", you can see which code numbers are already being used. You can overwrite existing codes by entering the corresponding code number. 5-38 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input 5.3.6 Evaluating In this dialog box, you can start the processing mode. The codes are read and, if applicable, checked to find out whether they match a trained code or whether they contain one or more predefined strings. Depending on whether or not you use multicode (see Options, Part 5 : Extras), you can use individual codes (if Multicode > Use = Off) or code sets (if Multicode > Use = On). Select code / Select code set Here, you enter the number of a previously trained code or code set that you want to compare with a current code. The following values are available here: * The numbers of all codes / code sets that have already been trained * "Auto", if you set the value "Read" as job in the "Job" drop-down list box in "Options" in Part 1/5: Decoder. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-39 Operator Input 5.3.7 Options The "Options" dialog is made up of the following five parts: * Part 1/5: Decoder * Part 2/5: Lighting & Acquisition. * Part 3/5: Security * Part 4/5: Diagn. & Monitoring * Part 5/5: Extras Part 1/5: Decoder In the "Decoder" group box, you specify the job you want to perform with the VS 130-2/VS 130-2vcr: Read, Match or Verify. With the match function, the entire code or parts of it is compared with a trained code, with the Verify function, the quality values of the currently read code are related to the quality values of a trained code. You also specify the reading speed and set the maximum processing time with the cycle time limit. 5-40 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input Part 2/5: Lighting & Acquisition. In the "Lighting" group box, you set the type of lamp you are using. In the "Acquisition" group box, you enter the type of lighting control and set the exposure time, the brightness, the light source and, if necessary, the shutter speed offset. You will find further information in the online help that you can call with the "Help" button. Part 3/5: Security In this tab, the administrator must also specify which user is permitted to execute which tasks and can, when necessary, change the passwords of the users. Users can also log on under their names with the appropriate password. Below the "User" table, you can see the role for which you are currently logged on. In the "Log on" group box, you can change this role by selecting a role from the "User" dropdown list box and logging on with the correct password. Part 4/5: Diagn. & Monitoring In this tab, you specify the information to be stored for diagnostic purposes. In "Image" in the "Logging" group box, you specify which pictures will be stored and in which form on the processing unit. In "Report", you specify the form in which diagnostic events will be stored on the processing unit. In the "Time base" group box, you specify whether the time stamp of the diagnostic events is provided by the PC or by an SNTP server of the network. If you select SNTP as the source, you must also specify the IP address of the server. In the "Monitoring" group box, you specify whether a live image is displayed in processing mode. In the "Persistence" group box, you specify which diagnostic information you want to store permanently on the EPROM. If the "Save NOK image" check box is enabled, the image of the next NOK signal is stored. If an image is already stored, it is overwritten when this function is selected. If the "Save diag. entries" check box is enabled, the number of diagnostic entries you specify in the input box will be entered in the EPROM. Existing entries are deleted when you switch over to On. If the diagnostic buffer in the EPROM reaches the number of permanently storable diagnostic data records, no further entries are made. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-41 Operator Input Part 5/5: Extras (only for VS 130-2) Lighting & Acquisition. The multilight function is only possible if you have connected a multiplexer and more than one lamp. Enable the "Multilight" function in the "Lighting and Acquisition" group box to be able to select the lamp used for the image capture from the setup support. When using the multilight function, only one of the lamps you select from the drop-down list box is ever active. In this mode, the result bits cannot be output over the DI/DO interface. Under "Autom. Exposure", you can decide whether the entire image area or a smaller area (region of interest) is used to calculate the optimum exposure parameters. You can change this region of interest by changing to the "Adjustment" dialog and moving or scaling (only possible when "Freeze/ROI" mode is activated) the red frame in the preview window. With "Use shuttersp. offset", you decide whether or not the automatically calculated exposure time is corrected by the value of the shutter speed offset (Part 2 of the "Options" dialog). Acceleration In the "Speedup" group box, you make the settings to speed up image processing. This is effective only when Speed = low (see Part 1 of the "Options" dialog). You have the following options: 5-42 * Use ROI": The region of interest set in the "Adjustment" dialog is used in the image processing. * "Decoder order": Here, you specify the order of the code types in which the processing unit attempts to decode a code when training, when reading (without prior training) and in adjustment mode. * With data matrix codes, there are the speedup parameters Polarity, Dimension and View that can each have the value "trained" or "dynamic": - Polarity: When Polarity = "trained" is set, the processing unit does not decode the read code if bright and dark dots are swapped over compared with the trained code. When Polarity = "dynamic" is set, the processing unit decodes the read code even if bright and dark dots are swapped over compared with the trained code. - Dimension: If Dimension = "trained", the processing unit does not decode the read code if the number of dots is different from the trained code. If Dimension = "dynamic", the processing unit decodes the read code even if the number of dots is different from the trained code. - View: If View = "trained" is set , the processing unit does not decode the read code if it is mirrored compared with the trained code. If View = "dynamic" is set , the processing unit decodes the read code even if it is mirrored compared with the trained code. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input Multicode The "Multicode" mode allows you to capture and evaluate several images at the same time with one trigger. To use this function, choose a code set number (1-14) in the "Code set" drop-down list box and select the codes to be included in the code set in "Contains codes". Based on the code set, the processing unit obtains the settings with which the images will be captured at the first trigger and the trained codes with which they will be compared. At each further trigger, the processing unit starts at the image of the code that was last read successfully. If no code can be read, the current decoding order is maintained. Note If a code set contains a code number under which no code was previously trained, you cannot use this code set for evaluation. With the "Info" job, you can see the code number under which trained codes are stored in Part 2/4: Code(s). Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-43 Operator Input 5.3.8 Info The Info dialog is made up of the following five parts: 5-44 * Part 1/5: Statistics. * Part 2/5: Code(s) * Part 3/5: Diagnostics * Part 4/5: Analysis * Part 5/5: Device Info Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input Part 1/5: Statistics In this part of the dialog, you can see statistical values relating to the reading of the codes and the read quality. You will find a description of the displayed information in the online help that you can call with the "Help" button. If you have disabled the Multicode mode (see Part 5 of the Options dialog), you enter information here out the currently used code. If the Multicode mode is enabled, a drop-down list box is displayed. In the dropdown list box, you can decide whether the statistics of the entire code set or the statistics of a specific code is displayed. If you simply want the statistics of the OK reads of a certain code, select the code number of the relevant set from the drop-down list box. With this setting, the "*" symbol is displayed at several positions. You can clear the statistics with the "Reset statistics" button if you have management permissions (see Options Part 3/4: Security). The statistics are reset automatically when you change the code. Information Part 2/5: Code(s) In this part of the dialog, you see the exposure and properties of a trained code or the settings of code to be read along with the image and the result string. In "Select code", you can specify the number of the trained code whose properties you want to display. In the "Training Information" group box, the shutter speed, if applicable the shutter speed offset, and the brightness with which the image was acquired during training of the code are displayed. The "Quality" group box displays all the quality characteristics of the trained code. The quality is specified as a quality grade (A = best to F = worst quality) and specified in an absolute value. By clicking on the "Runtime >" button, you open the page displaying the settings of a code to be read. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-45 Operator Input Information Part 3/5: Diagnostics Images In "Images", you can see the number of images currently in the image buffer. If you click the "Reset" button, you delete all images in the image buffer. Clicking the "Open" button opens a web page with all the images of the image buffer. If you click on one of these images, the image is magnified. Clicking the "Save" button opens a web page with all the images of the image buffer. You can save this Web page in various formats on your computer. Data record The "Data records" group box displays the number of diagnostic events currently in the events buffer. With the check box under "Content", you specify which information you want to display about the diagnostic events in the buffer: * Error: Information on the occurrence and acknowledgment (manual or automatic) of errors * Decode: Evaluation result * Image: Information on the image capture, for example shutter speed, brightness * States: Mode change (change to RUN, ADJUST, Self-test, etc.) * Controller: Change of control of the processing unit (control by keyboard, WEB, CPU) * Diagnostics: Changes that affect diagnostics, for example changing the diagnostic options, fetching a time stamp from an SNTP server By clicking the "Reset" button, you delete all the entries in the event buffer including the entries relating to temporary PROFIBUS DP or PROFINET IO errors. If you click on the "Save as CSV" button, a dialog opens in which you can store the events currently selected under "Content" as a csv file. Clicking the "Open&Save" button opens a web page with all the events of the events buffer. You can save this Web page in various formats on your computer. Persistent data records Clicking the "Open & Save" button opens a web page with all the diagnostic entries saved permanently on the processing unit. You can save this Web page on your computer. If you click on the "Save as CSV" button, a dialog opens in which you can save the diagnostic events permanently stored on the processing unit as a csv file. 5-46 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input Information Part 4/5: Analysis If the processing unit is in STOP mode, in this part of the dialog for the VS 130-2 you can display the last processed image, a persistently stored image or an image in the diagnostic buffer along with its additional information. You can also start an evaluation attempt for the displayed image. If processing is successful, the detected code type and the result string are displayed. With a data matrix code, you obtain further information on the total number of dots, the correct and corrected dots and on the surrounding rectangles of objects detected in the image. Information Part 5/5: Device Info This part of the dialog provides you with information on the processing unit, the firmware, the sensor and the software. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-47 Operator Input 5.3.9 Maintain Maintain code(s) In this group box, you can deleted trained codes by selecting the relevant code number from the drop-down list box and clicking on "Delete". When you click the "Reset" button next to "Factory settings:" you reset all parameters to their default values. The trained codes are also deleted. Maintain processing unit The "Save/Restore" button opens a Web page where you can save trained codes and parameter assignments or load them on the processing unit again. Note When you load a code on the processing unit, the parameters saved with the code are also loaded and therefore valid. The "Firmware update" button opens a Web page where you can update the firmware. Note If you control the VS 130-2/VS 130-2vcr from an automation system, make sure that the DISA bit is not set during the firmware update. This prevents a programmable controller from changing the processing unit to RUN. 5.3.10 Stop When you call this dialog, you change the processing unit to STOP mode. 5-48 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input 5.4 Operator Control over Personal Digital Assistant (PDA) 5.4.1 Prerequisites To be able to operate the Vision Sensor SIMATIC VS 130-2/VS 130-2vcr over a PDA, the following requirements must be met: * WLAN-compliant PDA with the Windows Mobile 2003 operating system, for example, Fujitsu-Siemens Pocket LOOX 610 * Macromedia Flash Player 6 is installed on the PDA * Established connection between the PDA and the processing unit over a WLAN router How you establish this connection is described in Establishing a connection between PDA and processing unit. We recommend a work memory of 128 Mbytes or larger. 5.4.2 Establishing a Connection between PDA and Processing Unit To establish a connection between PDA and processing unit, follow the steps outlined below: 1. Install and configure your WLAN router. You require an Ethernet connection between your PC and the router (for example, Siemens Gigaset SE505 dsl/cable). Configure the router as DHCP server and, if necessary, change its IP address. To set the configuration, you work in the user interface of the router over a JAVA-compliant browser by entering the preset IP address. 2. Configure the processing unit as a DHCP client. You do this in the Connect> Ports> Ethernet> IP Mode menu by setting "DHCP". 3. Connect the WLAN router to the processing unit over an Ethernet cable and turn the processing unit on. Then check the IP address assigned to the processing unit by the router in the Connect> Ports> Ethernet> IP Address menu. 4. Enable Wireless LAN on your PDA. Depending on the PDA, you will either have to install a wireless network adapter or simply enable the Wireless LAN integrated on the PDA. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-49 Operator Input 5.4.3 Starting or stopping setup support from the PDA It is assumed that the connection between PDA and processing unit is established. Proceed as follows: 1. Start the Internet Explorer on the PDA, enter the IP address in the "Address" input box and then press "Enter". The start page of the setup support appears. 2. Click on "Live image for PDA". The user interface of the PDA for the VS 130-2/VS 130-2vcr appears. Note If you have started the user interface of the PDA, you can only run the setup support from a PC/PG in read-only mode. If you want to terminate the connection to the processing unit, turn off the PDA. Closing the Internet Explorer does not terminate the connection. 5.4.4 User interface of the PDA Overview The user interface consists of the following elements: * Live image * Text display row * Operator input row with the mode button, the "Trg" trigger button (VS 130-2vcr only) and the code selection. Note If there is a connection between the Web browser of a PC and the processing unit or the VS 130-2/VS 130-2vcr is being controlled by an automation system, all buttons are disabled and "(Read Only Mode)" is displayed in the text display row. As long as no physical connection can be established to the processing unit, "Connecting..." is displayed. The labeling of the buttons and their function depend on the current status of the VS 130-2/VS 130-2vcr. This also applies to the strings of the text display row. This is explained in detail below. 5-50 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input Mode button Current status of the Vision Sensor Label of the Mode button Meaning RUN -> Adjust Changes to the adjustment mode Adjust -> Run Changes to the processing mode STOP -> Adjust Changes to the adjustment mode Train -> Adjust Changes to the adjustment mode Error Acknowledge error Acknowledges the error and exits the error status "Trg" trigger button This button exists only with the VS 130-2vcr. It is enabled only when the processing unit is in RUN. If you click on this button, you simulate an external trigger signal. Code selection Using the "<" and ">" buttons, select a trained code with the settings you want to use for the image processing. Code selection is enabled only in the adjustment mode. Text display row Current status of the Vision Sensor Content of the text display row RUN "Run:" + result string or "ReadErr (Nothing found)" Adjust "Adjust: live" or "Adjust: read" STOP "Stop" Train "Stop" Error "Error:" + Error number Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-51 Operator Input The text display in the Adjustment status of the Vision Sensor has the following meaning: * "Adjust: live": No code could be decoded yet (corresponds to "Recognition: running" on the setup support). * "Adjust: read": No currently read code could be decoded (corresponds to "Recognition: successfully finished" on the setup support). * If an error occurs, an error number is output here. You will find the meaning in the following table. No. 0 1 2 3 4 5 6 7 8 9 5-52 Description The connected sensor type is not supported. No sensor connected. Possible Remedies Connect a sensor supported by VS 130-2/VS 130-2vcr. Connect the sensor to the processing unit correctly. DISA changed at an invalid time Check the sequence of applied signals. Start the (during training) training again. During training, the correct Check the sequence of applied signals. Start the sequence of applied signals is training again. not kept to. The code could not be recreated. Run the training again. The send buffer is full because Reduce the trigger frequency or process the the data cannot be sent in an results more quickly on the server. A high load on adequately short time, the network to which the processing unit is connected can also block the transfer of the data. If necessary, check the network connection. The send buffer is full because Reduce the trigger frequency or reduce the the data cannot be sent in an amount of diagnostic data to be archived. Process adequately short time or the the results on the server faster. A high load on the server does not confirm receipt network to which the processing unit is connected of the data in good time can also block the transfer of the data. If necessary, check the network connection. The transfer of the last read Reduce the trigger frequency or process the result is not yet completed, the results more quickly. next read result is, however, If necessary, change the transmission rate for the already available, or the DP DP configuration or the update time for the master or IO controller does not PROFINET configuration. reply within the handshake monitoring time (parameter Connect >Ports >DP >Timeout on processing unit or within the time limit parameter in PROFIBUS DP in Part 1/3: Ports of the Connections dialog in the setup support, parameter Connect >Ports >PNIO >Timeout on processing unit or within the time limit parameter in PROFINET IO in Part 1/3: Ports in the "Connections" dialog in the setup support). The DP settings are not correct Correct the DP settings. No code was found in the image Position the code within the image or improve the during training. image quality. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Operator Input No. 10 11 12 13 14 15 16 18 19 Description The trained code cannot be processed with the match settings (for example ID/separator not found) The code found during training does not comply with the ECC 200 standard. Error in PROFIBUS DP communication. Possible Remedies Adapt the match settings, or train a suitable code. Use a code that complies with the standard. Make sure that the parameters for communication over PROFIBUS DP and the communication partners are correctly configured and active. Check the connection to the DP master. Connection error in Make sure that the connected TCP server or communication over a TCP Ethernet RS-232 converter is correctly configured connection or when using an and operational. Ethernet RS-232 converter: Depending on the connected Ethernet RS-232 There is no TCP connection or converter, it can take up to 20 s before changes to the data transfer cannot be the RS-232 settings or parameter changes for the completed within the set time trigger source or the output of the result string to limit. "TCP/RS232" take effect. During this time, the first trigger of a processing cycle should not occur nor should that be a change to RUN. Error in communication over the Check the connection to the server. archiving connection: There is no Make sure that the data is processed by the server TCP connection, the server does in an adequately short time and that the protocol is not respond within the set time maintained. limit or violates the archiving protocol. The IR lighting unit is Reduce the trigger frequency or reduce the shutter overloaded. speed. Below you will see the maximum trigger frequency fT for the selected shutter speeds TB: * TB = 500 s: fT = 60 Hz * TB = 1000 s: fT = 40 Hz * TB = 2000 s: fT = 20 Hz * TB = 3000 s: fT = 13 Hz * TB = 4000 s: fT = 10 Hz * TB = 5000 s: fT = 8 Hz * TB = 6000 s: fT = 7 Hz * TB = 7000 s: fT = 6 Hz * TB = 8000 s: fT = 5 Hz * TB = 9000 s: fT = 4.5 Hz * TB = 10000 s: fT = 4 Hz Note: Trigger frequencies > 33 Hz are not practicable. You are attempting to train code Select a code number between 1 and 14. number 15 over digital I/O or PROFIBUS DP or PROFINET IO. This is, however, are reserved for automatic learning. An error occurred in PROFINET Make sure that the parameters for communication I/O communication over PROFINET I/O and the communication partners are correctly configured and active. Check the connection to the I/O controller. An error occurred when saving Contact Customer Support if this error occurs to the read-only memory. often. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 5-53 Operator Input 5.4.5 Known PDA problems Two known PDA problems are described below: * The cache is full after some time. The Web browsers of some PDAs have the unwanted tendency to store more and more data in the cache as time goes on without releasing the memory again. As a result, the Web browser no longer runs. * If you click the "Close" button, the Web browser is removed from the screen of some PDAs but continues to run in the background. In conjunction with the first problem explained above, this soon leads to memory overflow. You can counter these problems with the measures described below. Follow the order of steps below and following each step, check whether the memory used has been released again. If it is released, the remaining steps are unnecessary. 1. Exit the Web browser as follows: Start > Settings > "System" tab > Memory > "Running Programs" tab, select "Internet Explorer" and click on the "Stop". 2. Internet Explorer: Tools > Options... > "Memory" tab, click on the "Delete Files" button. 3. Turn the PDA off. 4. Run a soft reset on the PDA (usually by pressing a hidden button with a pen or similar). 5. Run a hard reset on the PDA. 5-54 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6 Process Interface 6.1 Introduction As an alternative to controlling from the operator panel or using the setup support, you can also control SIMATIC VS 130-2/VS 130-2vcr from a programmable controller. This makes it possible to train and work almost automatically. Control over PROFIBUS DP and PROFINET IO is only possible with the VS 130-2, control over the I/O interface "DI/DO", on the other hand, is possible with VS 130-2 and VS 130-2vcr. Note The automatic training and changing of codes by a programmable controller is only possible with active setup support when in the "Options part 3/4: Security", the check box "Take control" is not enabled for the current user. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6-1 Process Interface 6.2 Integrating the DP slave VS 130-2 in HW Config The supplied device master data file SIEM8111.GSD contains the PROFIBUS properties of the VS 130-2 DP standard slave. If you are using a STEP 7 version earlier than V5.3 SP1, the Vision Sensor VS 130-2 is not yet in the modules catalog in HW Config. In this case, you must add it to the catalog with Options > Install GSD... . Remember that the corresponding bitmap file VS1X0__N.DIB must be in the same folder as the GSD file. You can download both files from the Internet at http://support.automation.siemens.com/WW/llisapi.dll?func=cslib.csinfo&lang=de&o bjID=10807086&subtype=133100. The Vision Sensor VS 130-2 then appears in the modules catalog under PROFIBUS DP \ Additional Field Devices \ General \ Machine Vision (see screenshot below). In the configuration example above, the control byte of the VS 130-2 was set to output address 0 and the status byte of the VS 130-2 was set to input address 0 of the CPU (DP master, slot 1). If these addresses are in the process image of OB1 (process image partition "OB1 PI"), you can work here in OB1 with process image access (for example "A I0.6" or "S Q0.1"). If this is not the case, you must work with direct I/O access (for example "L PIB 0"). In the configuration example above, the start of the 16 word long consistent communication area of the Vision Sensor VS 130-2 was set to input address 1 and output address 1 (slot 2). If these addresses are in the process image of OB1 (process image partition "OB1 PI"), you can work here in OB1 with process image access (e.g. "L EW 2", "T AB 1"), without violating the consistency (This is only valid for CPUs which transfer consistent user data per process image, see the note below). If, on the other hand, these addresses are not in the process image of OB1, you must access the communication area of the VS 130-2 using SFCs 14 "DPRD_DAT" and 15 "DPWR_DAT" to ensure consistency. 6-2 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Process Interface Note The consistent user data transfer per process image is supported by the following S7 CPUs: * from the CPU 318 and S7-400 CPUs as of firmware version V3.0.0 * from all S7-300 CPUs with MMC for all other S7-300 and S7-400 CPUs, the mandatory installation of SFCs 14 "DPRD_DAT" and 15 "DPWR_DAT" is required. The Vision Sensor VS 130 -2 detects the transmission rate on PROFIBUS automatically. Even if the transmission rate has changed, this is detected automatically. The following values possible: * 9.6 Kbps * 19.2 Kbps * 45.45 Kbps * 93.75 Kbps * 187.5 Kbps * 500 Kbps * 1.5 Mbps * 3 Mbps * 6 Mbps * 12 Mbps The PROFIBUS address of the VS 130-2 is set in the Settings > Ports > DP Addr. menu of the processing unit. Possible values are 1, ... 125. Changing the PROFIBUS address via PROFIBUS is not supported. If you assign parameter values to the Vision Sensor VS 130-2 via PROFIBUS, you can only set its default values (all zero). If you enter values other than zero here, a slave diagnostic message is generated ("Invalid DP parameters"). If you use an S7 CPU as the DP master, a diagnostic interrupt is triggered (no OB82 start because the CPU is in STOP): "Faulty module" is entered in the diagnostic buffer and the "SF" LED lights up. If you encounter problems when integrating in HW Config, you will find information on possible causes in Product description and Important Requirements for Installation. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6-3 Process Interface 6.3 Integrating the PROFINET I/O Device VS 130-2 in HW Config You will find the PROFINET properties of the I/O device VS 130-2 in the supplied GSDML-V1.0-Siemens-VS130-2-20041021.xml (General Station Description) file. If you are using a STEP 7 version earlier than V5.4, the Vision Sensor VS 130-2 is not yet in the modules catalog in HW Config. In this case, you must add it to the catalog with Options > Install GSD... . Remember that the corresponding bitmap file VS100.bmp must be in the same folder as the GSD file. You can download both files from the Internet at http://support.automation.siemens.com/WW/llisapi.dll?func=cslib.csinfo&lang=de&o bjID=10807086&subtype=133100. The Vision Sensor VS 130-2 is in the modules catalog under PROFINETIO \ General \ VS100 (see screenshot below). In the configuration example above, the control byte of the VS 130-2 was set to output address 0 and the status byte of the VS 130-2 was set to input address 0 of the CPU (DP master, slot 1). If these addresses are in the process image of OB1 (process image partition "OB1 PI"), you can work here in OB1 with process image access (for example "A I0.6" or "S Q0.1"). If this is not the case, you must work with direct I/O access (for example "L PIB 0"). In the configuration example above, the start of the 16 word long consistent communication area of the Vision Sensor VS 130-2 was set to input address 256 and output address 256 (slot 2). If these addresses are in the process image of OB1 (process image partition "OB1 PI"), you can work here in OB1 with process image access (e.g. "L EW 2", "T AB 1"), without violating the consistency (This is only valid for CPUs which transfer consistent user data per process image, see the note below). If, on the other hand, these addresses are not in the process image of OB1, you must access the communication area of the VS 130-2 using SFCs 14 "DPRD_DAT" and 15 "DPWR_DAT" to ensure consistency. 6-4 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Process Interface Note The consistent user data transfer per process image is supported by the following S7 CPUs: * from the CPU 318 and S7-400 CPUs as of firmware version V3.0.0 * from all S7-300 CPUs with MMC for all other S7-300 and S7-400 CPUs, the mandatory installation of SFCs 14 "DPRD_DAT" and 15 "DPWR_DAT" is required. The Vision Sensor VS 130 -2 detects the transmission rate on PROFINET automatically. PROFINET is operated in 100 Mbps full duplex mode. Follow the procedures below when entering the device name for the VS 130-2/VS 130-2vcr: Step 1 2 Activity In HW Config, open the properties window of the VS 130-2 and enter the device name there. When you are done, save and compile the hardware configuration. Inform the VS 130-2 of the device name you just specified. This is done in three ways: * In HW Config, select PLC > Ethernet > Assign Ethernet Address... and click the "Browse" button. Following this, all the devices connected to the PNIO system will be displayed (Caution: VS 130-2 must be in IP mode "PNIO" otherwise it is not displayed!). Select the VS 130-2 using its MAC address and identify it, if need be, using the "Blink" button (The "LINK" LED will blink at the Ethernet connector on the VS 130-2.). Enter the device name and click on the "Assign Name" button. * Enter the device name directly in the processing unit (Connect > Ports > PNIO > Devname). * Assign and transfer the device name using the applet (Connections Part 1/3: Ports, PROFINET IO, Device name parameter). Note When installing a CPU 317-2 PN/DP, in the individual network in the Properties window of the PROFINET I/O system (slot X2) on the "Options" tab, you have to select "Transmission medium/duplex": "Automatic Settings" Attention VS 130-2 does not support an update time less than 4 ms and cannot be set to lower update times. If you are setting up the configuration with STEP 7 V5.3 + SP1, the minimum update time for all PROFINET IO devices of the affected PROFINET system changes to 4 ms. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6-5 Process Interface 6.4 Control Via the "DI/DO" I/O Interface 6.4.1 Control Signals You will find the pin assignment of the "DI/DO" I/O interface in Port pin Assignment of the Processing Unit. Input signals Name Function DISA Disable: Disable manual control panel input, code selection and train via digital I/O, error acknowledgment, start of the processing unit Select 0: Code selection bit 0 Select 1: Code selection bit 1 (if TRN=0) / train code (if TRN=1) Select 2: Code selection bit 2 Select 3: Code selection bit 3 Train: Train new code Trigger : An evaluation is started on the positive-going edge SEL0 SEL1 SEL2 SEL3 TRN TRG RES Reset: Reset error Note The SEL0, SEL1, SEL2, SEL3, TRN and RES signals only take effect when DISA=1. Output signals Name Function LEDs IN_OP In operation: Group error * * TRD 0 = error message is displayed. SF on SF off * 1 = SIMATIC VS 130-2/VS 130-2vcr functional, no errors * TRAINED Trained: * In Run: 0 = selected code has not been trained 1 = selected code has been trained * In Training (TRN=1): 0 = training active RDY 1 = acknowledgment signal (RDY=0) Ready: * READY 0 = Device startup or SIMATIC VS 130-2/VS 130-2vcr in Stop * 1 = SIMATIC VS130-2/VS 130-2vcr in run READ Evaluation result: Code was localized and decoded MATCH Evaluation result: Code matches learned code N_OK Code was not legible. 6-6 READ MATCH N_OK Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Process Interface 6.4.2 Selecting the Mode You can use the following modes: * Select Code * Train Code * Start Processing You will find a description of the modes in Working with the Processing Unit. Select Code To select a code, apply the appropriate bit pattern to the inputs SEL0 to SEL3. You can select codes 1 to 15. If you select code 0, the last selected code is retained. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6-7 Process Interface Step 1 Input Output Description DISA=1 Prepare code selection TRN=0 DISA must have the value 1 for this. No edge change is required, however. TRG=0 RES=0 2 Select code (based on example of code 11) SEL0=1 SEL1=1 SEL2=0 SEL3=1 3 TRD=0 The code changeover is started RDY=0 4 TRD=1 RDY=0 5 TRD=1 RDY=1 The code selection is confirmed after 150 ms. Code 11 is selected. The code changeover is completed after a time of approximately 150 ms to 15 s. Note If the selected code has not been trained, TRD and RDY retain the value 0. 6-8 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Process Interface Train Code The diagram below illustrates an example of the training sequence for code 11. Note that the trigger signal must be applied for at least 5 ms. Note After an error has occurred, you must set the signals SEL0 to SEL3 and the signal TRN to 0 and then reset the error with the RES signal. The DISA signal must have a value of 1 (no edge change). Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6-9 Process Interface The training sequence is described below. Step Input 1 DISA=1 Output Description Disable button input. DISA must have the value 1 for this. An edge change is not required. Apply for at least 100 ms: Select the code to be trained (based on example of code 11) SEL0=1 SEL1=1 SEL2=0 SEL3=1 2 TRN=1 Start training SEL0, SEL1, SEL2, SEL3=0 3 TRD=0 TRD signal changes to FALSE RDY=0 RDY signal changes to FALSE Wait at least 200 ms Feed object with code SEL1=1 Train Apply for at least 5 ms: Trigger signal TRG=1 4 5 TRD=1 Selected code has been trained SEL1=0 Reset signals TRN=0 End training TRD=0 TRD signal changes to FALSE (for 150 ms) TRD=1 TRD signal changes to TRUE RDY=1 Training is ended Start Processing Processing is started immediately after completion of training. Step Input Output Description 1 If required, you select a code (see above). 2 The outputs are set as follows depending on the evaluation result: 6-10 READ Code was localized and decoded. MATCH Code matches learned code. N_OK Code was not legible. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Process Interface 6.5 Control over PROFIBUS DP and PROFINET IO 6.5.1 File Transfer Principle over PROFIBUS DP and PROFINET IO The following block diagram shows the relevant interfaces of the processing unit for data transmission over PROFIBUS DP and PROFINET I/O. Note Of the "Send" user data interface, bytes 1 to 31 are relevant, of the "Receive" user data interface, only bytes 1 and 4 are relevant. If these two user data interfaces are not located in the process image of OB1, you must use SFC 14 "DPRD_DAT" during the data transfer from the "Send" user data interface of the processing unit to the DP master to ensure data consistency. In the opposite direction, SFC 15 "DPWR_DAT" must be used for data transmission from the DP master to the "Receive" user data interface. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6-11 Process Interface 6.5.2 Assignments for PROFIBUS DP and PROFINET IO-relevant Interfaces for the Processing Unit Control byte Bit No. Corresponds to Signal Function 0 Disable: Disable manual control panel input, code selection and train, error acknowledgment, start of the processing unit DISA 1 SEL0 Select 0: Code selection bit 0 2 SEL1 Select 1: Code selection bit 1 (if TRN=0) / train code (if TRN=1) 3 SEL2 Select 2: Code selection bit 2 4 SEL3 Select 3: Code selection bit 3 5 TRN Train: Train new code 6 TRG Trigger : An evaluation is started on the positive-going edge 7 RES Reset: Reset error Note The SEL0, SEL1, SEL2, SEL3, TRN and RES signals only take effect when DISA=1. Status byte Bit No. Corresponds to Signal Function 0 IN_OP 1 TRD 2 RDY 3 4 5 6 7 READ MATCH N_OK - In operation: * 0 = error message is displayed. * 1 = SIMATIC VS 130-2 functional, no errors Trained: * In Run: 0 = selected code has not been trained 1 = selected code has been trained * In Training (TRN=1) 0 = training active 1 = acknowledgment signal (RDY=0) Ready: * 0 = device startup or SIMATIC VS 130-2 in Stop * 1 = SIMATIC VS 130-2C in Run Evaluation result: Code was localized and decoded Evaluation result: Code matches learned code Code was not legible. Reserved Reserved Note Writing the control byte and reading and evaluating the status byte must be analogous to the time diagrams in Selecting Modes. 6-12 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Process Interface "Send" User Data Interface Byte No. Meaning 0 Reserved 1 Consecutive number of the data packet to be sent to the DP master or I/O controller 2 Net total length of the data to be transmitted in bytes (in STEP 7 format) 3 4 Data ID of the supplied data 5 1. User data byte ... ... 31 27. User data byte Note The "data ID of the supplied data" defines the transferred data. The coding corresponds to byte 4 of the "Receive" user data interface (refer to the relevant paragraph). In a read job, the ID of the currently transferred data is entered. "Receive" user data interface Byte No. Meaning 0 Reserved 1 Consecutive number of the current correct data packet to be sent to the DP master. 2 Reserved 3 Reserved 4 Data ID of the requested data 5 Reserved ... ... 31 Reserved The "data ID of the requested data" defines the data to be read. It can have the following values: ID (B#16#) 09 Meaning User data byte 1: Output code number selected on VS 130-2 User data byte 2: If the DISA bit is set, you can see whether a user is logged on over the setup support who has permission to override the DISA signal: 00H: "Take control" is activated, 01H: "Take control" is deactivated 81 Result string 82 Quality characteristics absolute 83 Quality characteristics as absolute values and result string 84 Quality characteristics in classes 85 Quality characteristics in classes and result string Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6-13 Process Interface ID (B#16#) Meaning 86 Quality characteristics in classes and quality characteristics absolute 87 Quality characteristics in classes, quality characteristics absolute and result string 88 Position of the data matrix code 89 Position and result string 8A Position and quality characteristics absolute 8b Position, quality characteristics as absolute values and result string 8c Position and quality characteristics in classes 8D Position, quality characteristics in classes and result string 8E Position, quality characteristics in classes and quality characteristics absolute 8F Position, quality characteristics in classes, quality characteristics absolute and result string If no data ID is entered, the code is processed but no data is transferred. No trigger is required for the data ID B#16#09. The following table shows which content and which data types are returned when the data ID contains the position or the quality characteristics. The order of the code characteristics in the table is identical to the order of code characteristics in the data package. If applicable, the result string is shown following the code characteristics. Data to be read consisting of ... Data type of each component Position of the data matrix code * X position INT * Y position * Roll angle * View angle * Symbol contrast * Print growth * Axial non-uniformity * Unused error correction Quality characteristics absolute Quality characteristic as classes * Symbol contrast * Print growth * Axial non-uniformity * Unused error correction * Overall quality REAL CHAR Note If the data to be read contains the absolute quality characteristics, note the value of the "Swap" parameter (in setup support in the task Connections Part 1/3 Interfaces in PROFIBUS DP or PROFINET I/O) or "Swap" (on the processing unit Connect > Ports > DP menu or Connect Ports PNIO). 6-14 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Process Interface 6.5.3 Sample program for data exchange if code length <= 27 bytes Below, you will see an example program for data exchange when the code length is a maximum of 27 bytes. Note The example program is only executable 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. Program information Only the pure result string is output (data ID B#16#81). The DP master or I/O controller does not check how many bytes the processing unit has supplied, but always reads 27 bytes without any monitoring. The start of the "Send" user data interface is at address 4 of the process image input table. The start of the "Receive" user data interface is at address 4 of the process image output table. To ensure consistency over the entire range (32 bytes) there must be no process image update during the program shown below. The user data are stored in data block DB17 starting at byte 4. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6-15 Process Interface STL program //Enter data ID (only necessary in the first cycle) L B#16#81 // Only result string M QB 8 // check no. of data packet for 1 L IB 5 // no. of data package from processing unit L 1 <> I // If no. not 1 JC m001 // ... there is then no user data // read user data from processing unit L ID 9 // read the first 4 bytes of user data M DB17.DBD 4 // enter in DB m001: 6-16 L M ID 13 DB17.DBD 8 // read the next 4 bytes of user data // enter in DB L M ID 17 DB17.DBD 12 // read the next 4 bytes of user data // enter in DB L M ID 21 DB17.DBD 16 // read the next 4 bytes of user data // enter in DB L M ID 25 DB17.DBD 20 // read the next 4 bytes of user data // enter in DB L M ID 29 DB17.DBD 24 // read the next 4 bytes of user data // enter in DB L M IW 33 DB17.DBW 28 // read the last but 2 bytes of user data // enter in DB L M IB 35 DB17.DBB 30 // Read the last byte of user data // enter in DB // acknowledge with no, of data packet L IB 5 // no. of data packet M QB 5 // send as acknowledgment to the processing unit BEU Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Process Interface 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 6-17 Process Interface Step Activity in the DP Master or I/O Controller User Program Last - 2 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 polls 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. Last - 1 Query byte 1 of the "Send" user data interface cyclically. As soon as the value 0 is read, go to last step. Last Acknowledge correct receipt of all data by writing the value 0 in byte 1 of the "Receive" user data interface. Response to Problems, Time-outs, and Errors The processing unit monitors the following: * The time between the arrival of two acknowledgments from the DP master is monitored for the time-out set in the Connect > Ports > DP > Timeout or Connect > Ports > PNIO > Timeout menu. * The correct sequence of the acknowledged data packets of the DP master or I/O controller is monitored. If an error occurs, the processing unit enters B#16#FF in byte 1 of the "Send" user data interface and so aborts the current data transmission. It is advisable to implement the following monitoring functions in the user program of the DP master or I/O controller: * Monitoring of the time between arrival of two consecutive data packets. * Monitor the correct order of the data packets sent by the processing unit. * Check whether the total length of the user data actually transferred matches the net total length of data to be transferred as specified by the processing unit at the start of the data transfer. If an error occurs, writing B#16#FF to byte 1 of the "Receive" user data interface causes the current data transmission to be aborted. 6-18 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Process Interface 6.5.5 FB 79 "VS130-2_CONTROL" Description With FB 79 "VS130-2_CONTROL", you have a convenient means of communication with SIMATIC VS 130-2. You simply specify the job and the block handles communication over the public interfaces described in Integrating the PROFINET IO Device VS 130-2 in HW Config. The following bits of the control byte must be processed outside the FB. * TRG (Trigger): Start Processing * RES (Reset): Acknowledgment of an error (see Error Messages) The FB monitors only the pure data traffic between VS 130-2 and the controller, in other words, the DONE parameter does not provide any information on the actual read result. To obtain a good/bad read evaluation, evaluate the following result bits of the status byte: * READ * MATCH * NOK The following tasks are possible: * Abort the current job * Select Code * Train a code * Output the result string * Output the position of the code * Output the quality characteristics of the currently read code * Output the number of the currently selected code * Output the current mode of the VS 130-2 * Reset the DISA control signal Whether or not a job can be correctly executed depends on the current mode of the VS 130-2 and its parameter assignment. Which job is possible in which mode of the VS 130-2 is explained below. For almost all tasks, FB79 sets the DISA control signal for the VS 130-2 to TRUE. This prevents the VS 130-2 from being controlled from the keyboard or an operator panel at the same time. The exceptions are the four following tasks: * Reset the DISA control signal * Abort the current job. The FB does not change DISA. * Output the number of the currently selected code. The FB does not change DISA. * Output the current mode of the VS 130-2. The FB does not change DISA. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6-19 Process Interface At the start of the new job, the output parameters are reset. Caution: A multiple FB79 call with the same instance is not permitted. Please note that with the parameters of the page "Connections Part 3/3: Integration" (setup support) or the "Connect > Integrate" menu (processing unit), you can influence the processing of the FB: * If you want to use the FB to read a result string, the output of the result string must be set on PROFIBUS DP or PROFINET IO. For the jobs "Change code" (COMMAND =W#16#0001), "Train code" (COMMAND =W#16#0002) and "Output the currently selected code" (COMMAND =W#16#0003, the number of the selected code is requested by the processing unit. The output of the result string must therefore be set on the PROFIBUS DP or PROFINET IO for this reason. * The ports for the DISA, SEL0 to SEL3, TRN, RES, IN_OP, TRD, RDY signals must always be set to PROFIBUS DP or PROFINET IO. * The port setting for the result bits READ, MATCH, NOK is irrelevant for the FB. Note If you use the FB, only the bits RES and TRG may be affected by your program in the control byte of the processing unit. All other bits of the control byte are affected by the FB. How It works FB79 "VS130-2_CONTROL" operates asynchronously; in other words, execution can extend over several FB calls. You start execution of the job by calling the FB with a job number higher than 0 . Execution of the job is completed when ACTIVE takes on the value FALSE and either DONE or ERROR takes on the value TRUE (positive-going edge). Please remember that various jobs are handled in one CPU cycle and therefore ACTIVE does not take on the value TRUE. This applies to the jobs "Read out mode" and "Reset DISA bit". In some cases, it may also not be possible to detect an edge change at DONE or ERROR. You should therefore evaluate the DONE and ERROR parameters at each block call. If the job was completed without error, DONE = TRUE. You should also evaluate ERRCODE, in this case, to be informed of warnings from the FB. As long as ACTIVE has taken on the value TRUE, you have to call the FB with identical assignment of the COMMAND input parameters. During this time, is also not possible to start a new job. Read jobs are cyclical jobs. This means that after starting a job with COMMAND=W#16#0081 to 008F, ACTIVE takes on the value TRUE. ACTIVE retains this value as long as the job is aborted. 6-20 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Process Interface The respective read cycle (that is, the transfer of a complete result string) is complete when ACTIVE takes on the value TRUE and either DONE or ERROR has taken on the value TRUE (positive-going edge). If you want to start an additional job while a read job is running, you have to abort the read job. This occurs by calling the FB with COMMAND=W#16#0000. In this case, ACTIVE does not take on the value FALSE. Depending on whether a result string is being transferred or not, either DONE or ERROR takes on the value TRUE. If ERROR takes on the value TRUE, ERRCODE does not take on the value DW#16#00010007. Note If an error occurs, set the processing unit to the STOP mode, correct and acknowledge the error. You can then set the processing unit back to RUN mode with a code change in a trained code (COMMAND = W#16#0001). Parameters Parameter Declaration Data type Address Default (instance DB) setting Description LADDR_ STEUER INPUT Address of the control byte of the VS 130-2 WORD 0.0 W#16# 0000 The address has to be in the process image of the used CPU. LADDR_ STATUS INPUT WORD 2.0 W#16# 0000 Address of the status byte of the VS 130-2 The address has to be in the process image of the used CPU. LADDR_ SEND INPUT WORD 4.0 W#16# 0000 Start address of the "Send" user data interface of VS 130-2 LADDR_ RECV INPUT WORD 6.0 W#16# 0000 Start address of the "Receive" user data interface of VS 130-2 COMMAND INPUT WORD 8.0 W#16# 0000 Job number The permitted values are described following the table. PARAM1 INPUT BYTE 10.0 B#16#00 Number of the code to be selected (relevant only for the jobs W#16#0001 and W#16#0002) RESET INPUT BOOL 11.0 FALSE Reset pending errors and initialize FB RECV INPUT ANY 12.0 ACTIVE OUTPUT BOOL 22.0 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Receive area for the result string. Only the data block area and the BYTE data type are allowed. You have to switch these parameters and the data block has to be at least as large as the maximum expected DMC string. FALSE ACTIVE=TRUE: Processing of the last job is not yet completed. 6-21 Process Interface Parameter Declaration Data type Address Default (instance DB) setting Description DONE OUTPUT DONE=TRUE: Job completed without error. BOOL 22.1 FALSE This means that the transfer between processing unit and FB (CPU) was successfully completed error-free for read jobs, (COMMAND = W#16#0081 to 008F). In order to find out if the DMC evaluation was successful, you have to evaluate the bits READ (Bit 3), MATCH (Bit 4) and N_OK (Bit 5) in the status byte of the processing unit. Error OUTPUT BOOL 22.2 FALSE ERROR=TRUE: An error has occurred. ERRCODE OUTPUT DWORD 24.0 DW#16# 00000000 Error information: * DW#16#0000 0000: No error * DW#16#0000 wxyz: Warning * DW#16#0001 wxyz: FB-internal error * DW#16#0002 wxyz: Processing unit error (refer to the error information table at the end of this section) STATE OUTPUT WORD 28.0 W#16# 0000 Mode of the VS 130-2: * W#16#0000: Mode not up to date * W#16#0001: RUN (processing mode with output of the result string), in other words, bits IN_OP and RDY are set in the status byte. * W#16#0002: STOP (incl. training and adjust mode), in other words, bit IN_OP is set in the status byte, bit RDY, however, is not. * W#16#0003: ERROR, in other words, bit IN_OP is not set in the status byte CODE_OUT OUTPUT BYTE 30.0 B#16#00 No. of the code currently set on the VS 130-2 LENGTH WORD 32.0 W#16# 0000 Length of the result string in bytes 6-22 OUTPUT Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Process Interface Permitted values for the COMMAND parameter Value (W#16#...) Meaning 0000 Abort current job or no job 0001 Change code 0002 Train Code 0003 Output number of the code currently selected on the VS 130-2 0004 Output current mode of the VS 130-2. 0005 Reset DISA control signal 0081 Output the result string that may have been modified 0082 Output absolute quality characteristics 0083 Output absolute quality characteristics and result string 0084 Output quality characteristics as grades 0085 Output quality characteristics as grades and output result string 0086 Output quality characteristics as grades and absolute 0087 Output quality characteristics as grades and absolute and output result string 0088 Output code position 0089 Output code position and result string 008A Output code position and output absolute quality characteristics 008B Output code position and output absolute quality characteristics and output result string 008C Output code position and output quality characteristics as grades 008D Output code position and output quality characteristics as grades and output result string 008E Output code position and output quality characteristics as grades and absolute 008F Output code position and output quality characteristics as grades and grades and output result string Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6-23 Process Interface Parameters not Interconnected with the Block (static local data): Parameter Declaration Data type Address Default (instance DB) setting Description X_POSITION STATIC INT 34.0 0 X coordinates of the code mid point relative to the image mid point (normalized to image size 640*480) Y_POSITION STATIC INT 36.0 0 Y coordinates of the code mid point relative to the image mid point (normalized to image size 640*480) ROT_ANGLE STATIC INT 38.0 0 Roll angle of the code mid point relative to the image mid point (normalized to image size 640*480) INCLINE STATIC INT 40.0 0 View angle (angle between sensor axis and the surface of the code field) CONTRAST_F STATIC CHAR 42.0 '' Symbol contrast as class (value valid if not ' ') GROWTH_F STATIC CHAR 43.0 '' Print growth as class (value valid if not ' ') NONUNIF_F STATIC CHAR 44.0 '' Axial non-uniformity as class (value valid if not ' ') ERR_CORR_F STATIC CHAR 45.0 '' Unused error correction as class (value valid if not ' ') QUALITY_F STATIC CHAR 46.0 '' Overall quality as class (value valid if not ' ') CONTRAST STATIC REAL 48.0 -1.0e+0 Symbol contrast as absolute value (value valid if not 1.0e+0) GROWTH STATIC REAL 52.0 -1.0e+0 Print growth as absolute value (value valid if not -1.0e+0) NONUNIF STATIC REAL 56.0 -1.0e+0 Axial non-uniformity as absolute value (value valid if not -1.0e+0) ERR_CORR STATIC REAL 60.0 -1.0e+0 Unused error correction as absolute value (value valid if not -1.0e+0) 6-24 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Process Interface When can you execute which job? Whether or not a job can be correctly executed depends on the current mode of the VS 130-2. The following table shows which job is possible in which mode of the VS 130-2. You will find the job number in the parameter table. Mode VS 130-2 Job No. = (hexadecimal) 0000 0001 0002 0003 0004 0005 0081 to 008F RUN (RDY=1) (processing mode with output of the result string) X X X X X X X STOP X X X X X X - ERROR (IN_OP=0) X X - X X X - Sequence when Aborting a Job (COMMAND = W#16#0000) You can only abort read jobs: * Read jobs (COMMAND = W#16#0081 to W#16#008F ) The block signals completion of the job abort with ACTIVE = FALSE. If a transfer is active when the job is aborted, the transfer is aborted and the error signaled with a suitable error message in the ERRCODE parameter. ERROR has the value TRUE and DONE has the value FALSE. A transfer is active if DONE and ERROR take on the value FALSE. Is no transfer is active at the time of the abort, on completion of the job of the ERRCODE parameter has value 0, ERROR has value FALSE, and DONE has value TRUE. Procedure for job change If reading is currently selected and you want to execute a different job, you must stop the currently active job (see above). Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6-25 Process Interface Sequence When Changing Codes (COMMAND = W#16#0001) If the VS 130-2 is currently executing a read job, follow the steps below: 1. Call FB79 with COMMAND=W#16#0000. This stops output of the result string (job W#16#0081). 2. Make a code change by calling FB79 with COMMAND=W#16#0001 and PARAM= new code number. When the job is started, the parameters DONE and ERROR have the value FALSE. The ACTIVE parameter changes to the value TRUE. The block changes the code selected on the VS 130-2 to the value specified in the PARAM1 parameter. It then queries the code currently selected on the VS 130-2 and outputs this in the CODE_OUT parameter. If the currently selected code matches the code specified in the PARAM1 parameter, the ACTIVE parameter has the value FALSE and the DONE parameter the value TRUE. If the currently selected code does not match the code specified in the PARAM1 parameter, the ACTIVE parameter has the value FALSE and the ERROR parameter the value TRUE. The ERRCODE parameter contains an appropriate error message. There is also a check to determine if the code change has been blocked by a "Service" or "User1" user logged on via the setup support who has taken control of the VS 130-2 and if the newly selected code has been trained. If an error is detected, the ACTIVE parameter changes to the value FALSE and the ERROR parameter changes to the value TRUE. The ERRCODE parameter contains an appropriate error message. 3. Call FB79 again cyclically with COMMAND= W#16#0081. If you attempt to cancel during an ongoing code change, the ERRCODE parameter takes the value DW#16#00000002 but the job is processed until the end. Note When the code is changed, the processing unit is set to STOP for at least 150 ms (see Selecting Modes "Select code"). In exceptional cases, a code change can take up to 15 seconds. If you specify the value 0 for the PARAM1 parameter, the previously selected code is retained. The value of PARAM1 cannot be changed before the job is completed. Note The following parameters must be set to PROFIBUS DP or PROFINET IO to process the job: 6-26 * Output the result string * Port for the DISA, SEL0 to SEL3, TRN, RES, IN_OP, TRD, RDY signals Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Process Interface Sequence When Training a Code (COMMAND = W#16#0002) To allow the FB to trigger training a code, the Connect > Integrate > Control parameter must either have the value "DP" or the value "PNIO" on the processing unit. The job can only be sent when VS 130-2 is not in ERROR mode (refer to the mode table following the parameter table). When the job is triggered, the parameters DONE and ERROR change to the value FALSE. The ACTIVE parameter changes to the value TRUE. The block trains the code specified by the PARAM1 parameter. Note In exceptional cases, training a code can take up to 35 seconds. The value of PARAM1 cannot be changed before the job is completed. It then queries the code currently selected on the VS 130-2 and outputs this in the CODE_OUT parameter. If the currently selected code matches the code specified in the PARAM1 parameter, the ACTIVE parameter has the value FALSE and the DONE parameter the value TRUE. If the currently selected code does not match the code specified in the PARAM1 parameter, the ACTIVE parameter has the value FALSE and the ERROR parameter the value TRUE. The ERRCODE parameter contains an appropriate error message. There is also a check to determine if the training has been blocked by a "Service" or "User1" user logged on via the setup support who has taken control of the VS 130-2 and if the training has been successful. If an error is detected, the ACTIVE parameter changes to the value FALSE and the ERROR parameter changes to the value TRUE. The ERRCODE parameter contains an appropriate error message. If you attempt to cancel during an ongoing training job, the ERRCODE parameter takes the value DW#16#00000002 but the job is processed until the end. Note The following parameters must be set to PROFIBUS DP or PROFINET IO to process the job: * Output the result string * Port for the DISA, SEL0 to SEL3, TRN, RES, IN_OP, TRD, RDY signals Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6-27 Process Interface Sequence When Outputting the Currently Selected Code (COMMAND = W#16#0003) When the job is triggered, the parameters DONE and ERROR change to the value FALSE. The ACTIVE parameter changes to the value TRUE. The block then queries the code currently selected on the VS 130-2 and outputs this in the CODE_OUT parameter. If the transfer of the code number is free of errors, the ACTIVE parameter changes to the value FALSE and the DONE parameter changes to the value TRUE. Note The following parameters must be set to PROFIBUS DP or PROFINET IO to process the job: * Output the result string * Port for the DISA, SEL0 to SEL3, TRN, RES, IN_OP, TRD, RDY signals Sequence When Outputting the Mode of the VS 130-2 (COMMAND = W#16#0004) The block recognizes the current mode based on the status byte of the VS 130-2 and outputs this in the STATE parameter: * If the IN_OP bit is not set, state 3 (ERROR) is output. * If the IN_OP bit is set, but the RDY bit is not set, state 2 (STOP) is output. * If the IN_OP bit is set and the RDY bit is set, state 1 (RUN) is output. Following this, the DONE parameter changes to the value TRUE and ACTIVE changes to the value FALSE. Note Since the job is completed in one CPU cycle, no edge change can be detected in the ACTIVE parameter. If the DONE parameter already has the value TRUE from a previous job, an edge change can also not be detected in this parameter. Note The following parameter must be set to PROFIBUS DP or PROFINET IO to process the job: Port for the DISA, SEL0 to SEL3, TRN, RES, IN_OP, TRD, RDY signals 6-28 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Process Interface Sequence When Resetting the DISA Bit (COMMAND = W#16#0005) The block resets the DISA bit in the control byte of the VS 130-2. Following this, the DONE parameter changes to the value TRUE and ACTIVE changes to the value FALSE. Note Since the job is completed in one CPU cycle, no edge change can be detected in the ACTIVE parameter. If the DONE parameter already has the value TRUE from a previous job, an edge change can also not be detected in this parameter. Note The following parameter must be set to PROFIBUS DP or PROFINET IO to process the job: * Port for the DISA, SEL0 to SEL3, TRN, RES, IN_OP, TRD, RDY signals Sequence of the Read Jobs (COMMAND = W#16#0081 to W#16#008F) Meaning of the COMMAND parameter for read jobs Value (W#16#...) Meaning 0081 Output result string 0082 Output absolute quality characteristics 0083 Output absolute quality characteristics and result string 0084 Output quality characteristics as grades 0085 Output quality characteristics as grades and output result string 0086 Output quality characteristics as grades and absolute 0087 Output quality characteristics as grades and absolute and output result string 0088 Output code position 0089 Output code position and result string 008A Output code position and output absolute quality characteristics 008B Output code position and output absolute quality characteristics and output result string 008C Output code position and output quality characteristics as grades 008D Output code position and output quality characteristics as grades and output result string 008E Output code position and output quality characteristics as grades and absolute 008F Output code position and output quality characteristics as grades and grades and output result string The read jobs can only be sent when VS 130-2 is in RUN mode (refer to the mode table following the parameter table). In contrast to all other jobs, the read jobs are "permanent jobs". This means that the ACTIVE parameter has the value TRUE even after fetching the current read results and/or the current position and/or the quality characteristics from the VS 130-2. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6-29 Process Interface You should therefore evaluate the DONE and ERROR parameters at each block call. If the transfer was successful, DONE = TRUE. This only means, however, that the transfer between processing unit and FB (CPU) has been completed error-free. In order to find out if the DMC evaluation was successful, you have to evaluate the bits READ (Bit 3), MATCH (Bit 4) and N_OK (Bit 5) in the status byte of the processing unit. In this case, refer to the following table for the behavior of FB79. You should also evaluate ERRCODE to be informed of warnings from the FB. VS 130-2 Target Area RECV The code could not be decoded. FB79 enters the string set in the "ReadErr" parameter. The code was successfully decoded; FB79 enters the result string. however, you have not set any specifications. The code was successfully decoded FB79 enters the string set in the "MatchErr" or "FilterMsg" but does not match your parameter if the Match or Filter function is set. If both these specifications. functions are selected, FB79 enters the string entered for "MatchErr". For more detailed information on "MatchErr" and "FilterMsg", please refer to Chapter 5. The code was successfully decoded FB79 enters the result string. and matches the specifications. Process the data entered in RECV before the next trigger otherwise the consistency of this data cannot be guaranteed! You should also evaluate the LENGTH parameter because the receive area is written only up to this length. You can abort an active read job by calling FB79 with COMMAND = W#16#0000. If an error occurs during execution of the job or while aborting an in-process read job, ERROR = TRUE. In this case, the ERRCODE parameter contains a code for the cause of the error that has occurred. FB79 writes B#16#00 to the RECV target area. Note The following parameters must be set to PROFIBUS DP or PROFINET IO to process the job: * Output the result string * Port for the DISA, SEL0 to SEL3, TRN, RES, IN_OP, TRD, RDY signals Startup reaction If an error occurs (ERRCODE <> DW#16#0000 0000), after calling an interrupt OB (for example OB82) and after a STOP-RUN change on the CPU, you must initialize the FB once with RESET=TRUE. Please enter a corresponding first call in your user program. 6-30 Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 Process Interface Error Information If an error occurred, ERROR is set to TRUE. The precise cause of the error is then displayed in ERRCODE. Apart from this, there are also warnings with which ERROR is set to FALSE. These indicate an error situation that does not lead to the current job being aborted. If ERRCODE <> DW#16#0000 0000 following an FB call, call the FB again with RESET=TRUE to reset the error information in the FB. Note By calling the FB with RESET=TRUE, you only acknowledge error displays of the FB. To acknowledge errors of the VS 130-2 (for example transmit error), set the RES bit of the control byte (see Assignments for PROFIBUS DP and PROFINET IO-relevant interfaces for the processing unit or Error messages). ERRCODE (DW#16#) Error Explanation 0000 0000 0 No error 0000 0001 0 New job not effective as long as an old job is active 0000 0002 0 Job cannot be canceled 0001 0001 1 Illegal job number (COMMAND parameter) 0001 0002 1 The job cannot be processed in the current VS 130-2 mode. 0001 0003 1 During operation (not startup and no error has occurred), the FB was called with RESET=TRUE or the user data interface is already being used by another FB instance. 0001 0004 1 Send/Receive user data interface is not available or does not exist 0001 0005 1 The code number selected on the processing unit does not correspond to the code number specified in the FB, possibly because control of the processing unit has been taken over by the setup support. 0001 0006 1 Illegal code number (PARAM1 parameter). Code numbers 1 to 14 (training) and 0 to 15 (change codes) are permitted. 0001 0007 1 Job aborted by user 0001 0008 1 Code training not possible, possibly because control of the processing unit has been taken over by the setup support. 0001 0009 1 Receive area not permitted. Only data blocks and the BYTE data type are allowed. 0001 8092 1 The receive area does not exist. 0001 8323 1 The receive area is too short. 0001 8325 1 Data area not permitted 0001 8330 1 The receive area is write-protected. 0002 0003 1 The selected code number has not been trained. 0002 0004 1 Code cannot be trained. Position the code within the image or improve the image quality. 0002 0005 1 Job aborted by processing unit Note If you receive error information other than that above, it originates from SFC 20 "BLKMOV" used for the entry in the result string in the receive area. This error information can be read in the online help for system functions and function blocks. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6-31 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 Process Interface Bits used in the control and status bytes The following control and status bits must be processed in addition to the FB79 call: Bit No. in an Corresponds to Signal Function Q x.6 Control byte TRG An evaluation is started on the positive-going edge. Q x.7 Control byte RES Reset error on the VS 130-2 I x.0 Status byte IN_OP 0: Error or startup, 1: VS 130-2 is functional I x.2 Status byte RDY 1: VS 130-2 is in RUN, in other words, ready to process codes. You can use this signal to enable the feeding of workpieces, 6.6.2 Sample Program for Outputting the Read Code to a PC or PG You will find the program described here on the manuals/commissioning CD in Examples\Excel. Process interfacing The configuration described in the section Reading codes or checking quality in a PROFINET environment and outputting over Ethernet is used as the basis. It is characterized by the PC or PG for outputting the read codes not being connected to the processing unit over RS-232 but over Ethernet. Once you have performed the activities described in the excel.wri file, the codes read by the VS 130-2/VS 130-2vcr are entered in an Excel table. Vision Sensor SIMATIC VS 130-2/VS 130-2vcr A5E00475759-01 6-33 Process Interface 6.6.3 Sample Program for Archiving Diagnostic Information on a PC or a PG You will find the program described here on the manuals/commissioning CD in Examples\Diagnostics. With the "mmidiag" sample, you can archive diagnostic data records in the form of csv files and diagnostic images as bitmaps on a PC. In addition to the diagnostic images, a text file is transferred that contains details of the image. Process interfacing The configuration described in the section Reading codes or checking quality in a PROFINET environment and outputting over Ethernet is used as the basis. It is characterized by the PC or PG for archiving the diagnostic data records and/or diagnostic images not being connected to the processing unit over RS-232 but over Ethernet. Setup support Make the following settings on the setup support: * Connections dialog, Ports tab: In "Archiving/MMI", enter the IP address and the port of the PC/PG on which you want to archive the diagnostic information. * Connections dialog, Integration tab: In "Diagnostic transfer", select what you want to archive. only diagnostic data records, only diagnostic images or both Example Program Make sure that set the same values in the "Connection" sample as on the setup support in the Connections dialog, Ports tab. Enter the maximum size of a csv file in "Options". If the current csv file exceeds this size, the sample program creates a new csv file. In the "Timeout" input box, you can also specify the time in seconds after which the sample program stops itself if it has not received a response from the processing unit during this time. This allows you to check whether the connection to the processing unit is still established. In "Output", you specify the folders in which the diagnostic images and the csv files will be stored. Once you have clicked the "Start" button, the program waits for the connection to be established by the processing unit. The transfer of the diagnostic data begins after the connection has been established. The file names have the following structure: 6-34 * csv files: diagrecs__