mechatronics - machine vision, model 5901

29
Mechatronics Machine Vision Job Sheets - Courseware Sample 86691-F0

Upload: others

Post on 27-Dec-2021

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Mechatronics - Machine Vision, Model 5901

Mechatronics

Machine Vision

Job Sheets - Courseware Sample 86691-F0

Page 2: Mechatronics - Machine Vision, Model 5901

Order no.: 86691-30 First Edition Revision level: 04/2015

By the staff of Festo Didactic

© Festo Didactic Ltée/Ltd, Quebec, Canada 2010 Internet: www.festo-didactic.com e-mail: [email protected]

Printed in Canada All rights reserved ISBN 978-2-89640-386-8 (Printed version) ISBN 978-2-89640-686-9 (CD-ROM) Legal Deposit – Bibliothèque et Archives nationales du Québec, 2010 Legal Deposit – Library and Archives Canada, 2010

The purchaser shall receive a single right of use which is non-exclusive, non-time-limited and limited geographically to use at the purchaser's site/location as follows.

The purchaser shall be entitled to use the work to train his/her staff at the purchaser's site/location and shall also be entitled to use parts of the copyright material as the basis for the production of his/her own training documentation for the training of his/her staff at the purchaser's site/location with acknowledgement of source and to make copies for this purpose. In the case of schools/technical colleges, training centers, and universities, the right of use shall also include use by school and college students and trainees at the purchaser's site/location for teaching purposes.

The right of use shall in all cases exclude the right to publish the copyright material or to make this available for use on intranet, Internet and LMS platforms and databases such as Moodle, which allow access by a wide variety of users, including those outside of the purchaser's site/location.

Entitlement to other rights relating to reproductions, copies, adaptations, translations, microfilming and transfer to and storage and processing in electronic systems, no matter whether in whole or in part, shall require the prior consent of Festo Didactic GmbH & Co. KG.

Information in this document is subject to change without notice and does not represent a commitment on the part of Festo Didactic. The Festo materials described in this document are furnished under a license agreement or a nondisclosure agreement.

Festo Didactic recognizes product names as trademarks or registered trademarks of their respective holders.

All other trademarks are the property of their respective owners. Other trademarks and trade names may be used in this document to refer to either the entity claiming the marks and names or their products. Festo Didactic disclaims any proprietary interest in trademarks and trade names other than its own.

Page 3: Mechatronics - Machine Vision, Model 5901

© Festo Didactic 86691-30 III

Safety and Common Symbols

The following safety and common symbols may be used in this manual and on the equipment:

Symbol Description

DANGER indicates a hazard with a high level of risk which, if not avoided, will result in death or serious injury.

WARNING indicates a hazard with a medium level of risk which, if not avoided, could result in death or serious injury.

CAUTION indicates a hazard with a low level of risk which, if not avoided, could result in minor or moderate injury.

CAUTION used without the Caution, risk of danger sign , indicates a hazard with a potentially hazardous situation which, if not avoided, may result in property damage.

Caution, risk of electric shock

Caution, hot surface

Caution, risk of danger

Caution, lifting hazard

Caution, hand entanglement hazard

Notice, non-ionizing radiation

Direct current

Alternating current

Both direct and alternating current

Three-phase alternating current

Page 4: Mechatronics - Machine Vision, Model 5901

IV © Festo Didactic 86691-30

Symbol Description

Earth (ground) terminal

Protective conductor terminal

Frame or chassis terminal

Equipotentiality

On (supply)

Off (supply)

Equipment protected throughout by double insulation or reinforced insulation

In position of a bi-stable push control

Out position of a bi-stable push control

Page 5: Mechatronics - Machine Vision, Model 5901

© Festo Didactic 86691-30 V

Table of Contents

Preface ................................................................................................................. VII

About This Manual ................................................................................................ IX

To the Instructor .................................................................................................... XI

Job Sheet 1 Introduction to Machine Vision Software - Part 1 ................... 1

Job Sheet 2 Introduction to Machine Vision Software - Part 2 ................. 21

Job Sheet 3 Using the Machine Vision System ......................................... 37

Appendix A Equipment Utilization Chart .................................................... 53

Appendix B Safety Procedures ................................................................... 55

Appendix C Troubleshooting ....................................................................... 57

Appendix D PLC Program ............................................................................ 59

Page 6: Mechatronics - Machine Vision, Model 5901
Page 7: Mechatronics - Machine Vision, Model 5901

© Festo Didactic 86691-30 VII

Preface

The Flexible Manufacturing System (FMS), Model 5901-1 or Model 5901-3, is a modular system that allows students to experience challenges commonly encountered in facilities. The system comes with the necessary equipment to familiarize students with basic manufacturing applications such as: operating a flat-belt conveyor; feeding and sorting parts into containers; configuring and wiring sensors, buttons, indicator lights, and other devices; PLC programming; installing pneumatic equipment; troubleshooting.

The difference between Model 5901-1 and Model 5901-3 is in their Programmable Logic Controller. In Model 5901-1, the Allen-Bradley CompactLogix L32E (Model 5930-0) is used. With Model 5901-3, the Allen-Bradley CompactLogix L43 (Model 5930-A) is running the system. The L43 includes the functionalities of the L32E, but with integrated motion instructions.

The Flexible Manufacturing System (Advanced Applications), Model 5901-2 (add-on to 5901-1) or Model 5901-4 (add-on to 5901-3) is an add-on to the Flexible Manufacturing System. It allows students to create more sophisticated applications using the latest manufacturing technology such as: Servo Drive, Touch-Screen Operated Control, Machine Vision System, Bar Code Reader, and Optical Encoder. The fully automated Storage Unit option, Model 5940, is available as an add-on to Model 5901-3 and 5901-4.

The sequence in which the curriculum must be completed is shown below, along with the necessary equipment for each manual. The Introduction to Manufacturing manual must be completed first. Human-Machine Interface, Machine Vision, and Servo Control manuals can be completed independently, but are all prerequisites for FMS Production Line. Finally, Storage Unit requires knowledge of all the other subjects.

Page 8: Mechatronics - Machine Vision, Model 5901

Preface

VIII © Festo Didactic 86691-30

We invite readers of this manual to send us their tips, feedback, and suggestions for improving the book.

Please send these to [email protected].

The authors and Festo Didactic look forward to your comments.

Page 9: Mechatronics - Machine Vision, Model 5901

© Festo Didactic 86691-30 IX

About This Manual

The Job Sheets in this manual are designed for students already familiar with electrical wiring, basic PLC programming, and manufacturing processes. These topics are thoroughly covered in the reference textbook provided with the Flexible Manufacturing System. A careful reading of the reference textbook is highly recommended before proceeding with the Job Sheets.

As in the Introduction to Manufacturing manual, the difficulty and complexity increase with each Job Sheet. First, you familiarize yourself with the software used to configure and control the Machine Vision System. Once familiar with the software, you use the Machine Vision System for quality control on the Flexible Manufacturing System.

For each Job Sheet, the required programs are provided on the Flexible Manufacturing System Resource Kit (student) DVD-ROM. Videos of some of the setups presented in the Job Sheets of this manual are also available on the DVD-ROM.

Safety considerations

Safety symbols that may be used in this manual and on the equipment are listed in the Safety Symbols table at the beginning of the manual.

Safety procedures related to the tasks that you will be asked to perform are indicated in each exercise.

Make sure that you are wearing appropriate protective equipment when performing the tasks. You should never perform a task if you have any reason to think that a manipulation could be dangerous for you or your teammates.

Make sure that you are wearing appropriate protective equipment before performing any of the Job Sheet activities in this manual. You should completethe basic safety procedures listed in Appendix B of this manual whenever you begin a Job Sheet. Remember that you should never perform a job if you have any reason to think that a manipulation could be dangerous to you or yourteammates.

Flexible Manufacturing System Resource Kit DVD-ROM

This DVD-ROM contains configuration files, documentation, specialized software, and videos of the Flexible Manufacturing System in action. The configuration files are organized by application and corresponding device’s type.

a The content of the Flexible Manufacturing System Resource Kit DVD-ROM may have been copied by your instructor onto the computer used to control the Flexible Manufacturing System. If this is the case, ask your instructor where the content of the DVD-ROM can be found.

Page 10: Mechatronics - Machine Vision, Model 5901

About This Manual

X © Festo Didactic 86691-30

Systems of units

Units are expressed using the International System of Units (SI) followed by the units expressed in the U.S. customary system of units (between parentheses).

Page 11: Mechatronics - Machine Vision, Model 5901

© Festo Didactic 86691-30 XI

To the Instructor

You will find in this Instructor Guide all the elements included in the Student Manual together with the answers to all questions, results of measurements, graphs, explanations, suggestions, and, in some cases, instructions to help you guide the students through their learning process. All the information that applies to you is placed between markers and appears in red.

Accuracy of measurements

The numerical results of the hands-on exercises may differ from one student to another. For this reason, the results and answers given in this manual should be considered as a guide. Students who correctly performed the exercises should expect to demonstrate the principles involved and make observations and measurements similar to those given as answers.

Page 12: Mechatronics - Machine Vision, Model 5901
Page 13: Mechatronics - Machine Vision, Model 5901

Sample Extracted from

the Job Sheets Student and the Job Sheets Instructor

Page 14: Mechatronics - Machine Vision, Model 5901
Page 15: Mechatronics - Machine Vision, Model 5901

© Festo Didactic 86691-30 21

Familiarize yourself with the In-Sight Explorer software. Learn how to use the software tools to detect objects.

1. Proceed as in Job Sheet 1 to start the In-Sight software in emulation mode and configure the image sequence.

Experimenting with Product B images

Object counting tools

2. Open Parts_Counting.job (Figure 29).

Figure 29. Opening Parts_Counting job.

This job is associated with the bxxx.jpg category of images. Select image b001.jpg (Figure 30).

Introduction to Machine Vision Software - Part 2

Job Sheet 2

OBJECTIVE

PROCEDURE

Page 16: Mechatronics - Machine Vision, Model 5901

Job Sheet 2 – Introduction to Machine Vision Software - Part 2

22 © Festo Didactic 86691-30

Figure 30. Image b001.jpg.

3. The list of the different tools that compose the Parts_Counting job is located in the Palette section (at the right of the screen) under the Results tab (Figure 31). You can see that all tools count three items and return a PASS result.

Figure 31. Job Results (Parts_Counting).

4. Double-click on the Models tool in the Results section. This tool uses the same algorithm as the Patterns identification tool used in Job Sheet 1. It counts the number of patterns similar to the reference object within the search area.

From the Settings tab (Figure 32), we see that the found objects must be at least 60% similar to the reference object to count. The 180° Angle Tolerance

Page 17: Mechatronics - Machine Vision, Model 5901

Job Sheet 2 – Introduction to Machine Vision Software - Part 2

© Festo Didactic 86691-30 23

means that the found objects can be rotated 180° clockwise or counterclockwise compared to the reference object.

Figure 32. Settings tab of the Models tool.

Under the Range Limits tab (Figure 33), we see that the tool needs to find between 1 and 30 objects to return a PASS result.

Figure 33. Range Limits tab of the Models tool.

5. Double-click on the Models_PatMax tool in the Results section. This tool uses the same sophisticated algorithm as the PatMax Patterns identification tool used in Job Sheet 1 to count objects.

From the Settings tab (Figure 34), we see that the found objects must be 80% similar to the reference object to count, making this tool more restrictive than Models. The PatMax Find Mode is selected.

Figure 34. Settings tab of the Models_PatMax tool.

Under the Range Limits tab (Figure 35), we see that the tool needs to find between 1 and 30 objects to return a PASS result.

Page 18: Mechatronics - Machine Vision, Model 5901

Job Sheet 2 – Introduction to Machine Vision Software - Part 2

24 © Festo Didactic 86691-30

Figure 35. Range Limits tab of the Models_PatMax tool.

6. Double-click on the Blobs_Counter tool in the Results section. This tool is different than Models and Models_PatMax. Blobs_Counter counts the number of shapes formed by adjacent bits of common color in the search area.

From the Settings tab (Figure 36), we see that the found objects must contain between 100 and 100000 pixels to count and that the areas can be either black or white.

Figure 36. Settings tab of the Blobs_Counter tool.

Under the Range Limits tab (Figure 37), we see that the tool needs to find between 1 and 30 objects to return a PASS result.

Figure 37. Range Limits tab of the Blobs_Counter tool.

7. Select image b002.jpg. Does the fact that the objects are rotated change the tool results compared with image b001.jpg? Explain why for each tool.

No. The three tools still detect three objects. Models and Models_PatMax have an angle tolerance of 180, permitting rotation in any direction. Blobs_Counter is not affected by the position of a detected shape.

Page 19: Mechatronics - Machine Vision, Model 5901

Job Sheet 2 – Introduction to Machine Vision Software - Part 2

© Festo Didactic 86691-30 25

8. Select image b0003.jpg. On this figure, some of the six parts are superimposed. Which tool is able to give the best result?

Models_PatMax with 6 objects.

9. Select image b0004.jpg. How many different parts do you count?

14 parts.

10. Reduce the Models_PatMax Accept Threshold to 75. Is the tool now capable of detecting all objects?

Yes.

11. Select image b0005.jpg. On this figure, the objects are scaled differently. Check the Models Scale Tolerance box. Is the Models tool now detecting all the objects?

Yes.

Experimenting with the Product C image

Edge counting and filtering

12. Open the job Filtering.job (Figure 38).

Figure 38. Opening Filtering.job.

Page 20: Mechatronics - Machine Vision, Model 5901

Job Sheet 2 – Introduction to Machine Vision Software - Part 2

26 © Festo Didactic 86691-30

This job is associated with the cxxx.jpg category of images. Select image c001.jpg (Figure 39).

Figure 39. Image c001.jpg.

13. The list of the different tools that compose the Filtering job is located in the Palette section (at the right of the screen) under the Results tab (Figure 40).

Figure 40. Job Results (Filtering).

Page 21: Mechatronics - Machine Vision, Model 5901

Job Sheet 2 – Introduction to Machine Vision Software - Part 2

© Festo Didactic 86691-30 27

14. Double-click on the Edge_Counter tool in the Results section. This tool counts the number of linear edges in the search area and returns a PASS result if the number falls between the minimum and maximum range limits.

How many edges (Light to Dark or Dark to Light) can you count in the first series of lines on the left? Does the Edge_Counter tool return the same number of edges?

56 edges. No, Edge_Counter counts 52 edges.

15. Reduce the Edge Contrast from 75 to 50 under the Settings tab. Does Edge_Counter return the correct number of edges now?

Yes.

16. Double-click on the Edge_Pairs_Counter tool in the Results section. This tool counts the number of linear edge pairs in the search area and returns a PASS result if the number falls between the minimum and maximum range limits.

How many edge pairs (or lines) can you count on the left of the image? Does the Edge_Pairs_Counter tool return the same number?

28. Yes.

17. Increase the Minimum Distance from 0 to 5. What happens? Explain why.

The Edge_Pairs_Counter tool does not detect any edge because all the lines are thinner than 5 pixels.

18. Double-click on the Edge_Counter_2 tool. This tool works like the Edge_Counter tool except that it is linked to a point filter (Filter) that makes every pixel over 150 on the greyscale turn white, whereas pixels between 0 and 150 turn black (Figure 41).

Select Acquisition.Image under Tool Image in the Edge_Counter_2 Settings to remove the link to the point filter. What do you observe?

The Edge_Counter_2 tool is not able to detect the edges because there is not enough contrast anymore (refer to the graph at the bottom right of the screen if necessary).

Page 22: Mechatronics - Machine Vision, Model 5901

Job Sheet 2 – Introduction to Machine Vision Software - Part 2

28 © Festo Didactic 86691-30

Figure 41. Edge_Counter_2 with Filter.

19. Double-click on the Filter_2 tool. This neighbor filter calculates a particular relation between a pixel and its neighbors. The default Operation for this tool is Edge Magnitude. With this filter (Figure 42), pixels around which there is a transition turn white; pixels where there is no transition turn black.

If you compare the Execution Time (ms) of Filter and Filter_2 tools under their respective General tab, which tool takes more time to accomplish? Explain why.

The Filter_2 tool takes more time to accomplish because, for each pixel, the value of the pixels around must be taken into account.

Figure 42. Filter_2.

Page 23: Mechatronics - Machine Vision, Model 5901

Job Sheet 2 – Introduction to Machine Vision Software - Part 2

© Festo Didactic 86691-30 29

Experimenting with the Product D images

Quality control

20. Open the job Quality_Control.job (Figure 43).

Figure 43. Opening Quality_Control.job.

This job is associated with the dxxx.jpg category of images. Select image d001.jpg (Figure 44).

Page 24: Mechatronics - Machine Vision, Model 5901

Job Sheet 2 – Introduction to Machine Vision Software - Part 2

30 © Festo Didactic 86691-30

Figure 44. Image d001.jpg.

21. The list of the different tools that compose the Quality_Control job is located in the Palette section (at the right of the screen) under the Results tab (Figure 45).

Figure 45. Job Results (Quality_Control).

The Logo_Finder tool finds the Lab-Volt logo in the image. The logo position then serves as Tool Fixture for the other tools. In particular, Left_Edge and Distance_from_Left verify that the logo is well centered horizontally. Top_Edge and Distance_from_Top have the same purpose, but on the vertical axis.

Page 25: Mechatronics - Machine Vision, Model 5901

Job Sheet 2 – Introduction to Machine Vision Software - Part 2

© Festo Didactic 86691-30 31

Brightness_Part and Brightness_Logo check if the color of the analyzed object is kept within predefined greyscale limits. The Stats tool is a statistical tool that calculates the mean part color. In an industrial environment, such a tool could trigger an alarm indicating that the paint color is gradually fading.

22. Browse from image d001.jpg to image d007.jpg and enter the job result for each case. The job fails if any tool fails.

Page 26: Mechatronics - Machine Vision, Model 5901

Job Sheet 2 – Introduction to Machine Vision Software - Part 2

32 © Festo Didactic 86691-30

IMAGE FILE

JOBRESULT

TOOL(S) RETURNING A FAIL RESULT

FAILURE EXPLANATION

d001 PASS FAIL

d002 PASS FAIL

d003 PASS FAIL

d004 PASS FAIL

d005 PASS FAIL

d006 PASS FAIL

d007 PASS FAIL

IMAGE FILE

JOBRESULT

TOOL(S) RETURNING A FAIL RESULT

FAILURE EXPLANATION

d001 PASS

d002 PASS

d003 PASS

d004 FAIL Top_Edge Distance_from_Top

The logo is too low on the object. The top edge cannot be detected.

d005 FAIL Brightness_Part Brightness_Logo

The logo and the background of the object are too dark.

d006 FAIL Brightness_Part Brightness_Logo

The logo and the background of the object are too pale.

d007 FAIL Brightness_Logo The logo is too pale.

Page 27: Mechatronics - Machine Vision, Model 5901

Job Sheet 2 – Introduction to Machine Vision Software - Part 2

© Festo Didactic 86691-30 33

23. Adjust the Logo_Finder tool Accept Threshold to 96. Which images now make the job return a FAIL result? Explain what makes these images fail.

Images d002.jpg and d003.jpg now return a fail result. The ® logo of both figures is missing. Also, the hole of the “a” is missing on d003.jpg.

Experimenting with the Product E images

Barcode reading

24. Open the job Barcode.job (Figure 46).

Figure 46. Opening Barcode.job.

This job is associated with the exxx.jpg category of images. Select image e001.jpg (Figure 47).

Page 28: Mechatronics - Machine Vision, Model 5901

Job Sheet 2 – Introduction to Machine Vision Software - Part 2

34 © Festo Didactic 86691-30

Figure 47. Image e001.jpg.

25. The list of the different tools that compose the Barcode job is located in the Palette section (at the right of the screen) under the Results tab (Figure 48).

Figure 48. Job Results (Barcode).

The Logo_Finder tool finds the Lab-Volt logo in the image. The logo position then serves as Tool Fixture for the Text_Read and CodeID tools.

CodeID is a tool that reads 1D or 2D codes whereas the Text_Read tool recognizes characters for which it has been trained. Text_Match is a mathematical tool that returns a PASS result only if the bar code corresponds to the text.

Page 29: Mechatronics - Machine Vision, Model 5901

Job Sheet 2 – Introduction to Machine Vision Software - Part 2

© Festo Didactic 86691-30 35

26. Browse from image e001.jpg to image e003.jpg and enter the job result for each case.

IMAGE FILE

JOBRESULT

TOOL(S) RETURNING A FAIL RESULT

FAILURE EXPLANATION

e001 PASS FAIL

e002 PASS FAIL

e003 PASS FAIL

IMAGE FILE

JOBRESULT

TOOL(S) RETURNING A FAIL RESULT

FAILURE EXPLANATION

e001 PASS

e002 PASS

e003 FAIL Text_Match Text_Read and CodeID return a different code.

27. Ask your instructor to check and approve your work.

Name: ______________________________ Date: ____________________

Instructor's approval: ______________________________________________