Job Sheet 3 Using the Machine Vision System OBJECTIVE Install the Machine Vision System on the Flexible Manufacturing System and use it to perform quality control on the boxes filled with marbles. PROCEDURE Setup and connections 1. Perform the basic safety procedures listed in Appendix B of this manual. a Refer to the Equipment Utilization Chart in Appendix A of the manual to obtain the list of equipment required to complete this Job Sheet. Festo Didactic 86691-20 33
2. Connect the equipment as shown in the wiring diagram presented in Figure 37 or Figure 38, depending on your PLC version (5930-0 or 5930-A). Figure 37. Using the Machine Vision System wiring diagram (5930-0 PLC). 34 Festo Didactic 86691-20
a Figure 38. Using the Machine Vision System wiring diagram (5930-A PLC). PoE (Power over Ethernet) refers to a technology that allows the passing of electrical power through Ethernet cabling, along with the regular data. Festo Didactic 86691-20 35
a Make sure the AC Drive Start Source parameter (P036) is set to 5 (Comm Port). 3. Make the pneumatic connections according to the diagram presented in Figure 39. Pneumatic Box Feeder 5911 Push rod Pneumatic Sorting Device 5913 Stopper Lateral cylinder Directional Control Valve Station 5914 V1 V2 V3 V4 Safety Valve 6494 Conditioning Unit 6411-A Figure 39. Using the Machine Vision System pneumatic connections diagram. Be sure to adjust the pressure in the circuit downstream from the valve of the Conditioning Unit to 138 kpa (or 20 psi). 36 Festo Didactic 86691-20
4. Fill the Part Feeder using marbles of two different colors. Use black marbles in the first hopper and blue marbles in the second hopper, as shown in Figure 40. Also, make sure to use white boxes. A light background allows a greater contrast in the picture taken by the camera. First hopper Second hopper a Figure 40. Filling the Part Feeder s hoppers. To keep marbles from getting stuck in the Part Feeder mechanism, do not overfill the hoppers. Festo Didactic 86691-20 37
5. Install the camera on the mast and position it at the right of the Part Feeder, as shown in Figure 41. Figure 41. Positioning the camera on the FMS. 38 Festo Didactic 86691-20
6. Be sure to position the sensors as shown in Figure 42. 6373-B0 6375-B0 6374-B0 6375-B0 6375-B0 Figure 42. Sensors position. Festo Didactic 86691-20 39
7. Once completed, the setup should look as shown in Figure 43. Figure 43. Using the Machine Vision System setup. 8. Turn on the computer, the switch, and the PLC. The emergency push-button must be released. 9. Open RSLinx and verify that Ethernet communication with the PLC works correctly using RSWho. 10. Make sure that the PLC key is in the REM position. Start RSLogix 5000. Open the PLC program for your particular PLC model (L32E or L43) and download it to the PLC. 11. Put the PLC to Remote Run mode but do not press any button yet so that the conveyor remains static. 40 Festo Didactic 86691-20
12. Press the red push-button on the Indicator Light/Push-Button Station to power the drive and the Part Feeder. Make sure the AC Drive (01) and the Part Feeder (02) are scanned by the PLC DeviceNet scanner using RSNetWorx. For DeviceNet configuration details, refer to the Introduction to Manufacturing manual (P/N 38770-20). Configuration of the Machine Vision System 13. Start In-Sight Explorer. If the camera does not appear in the list of In-Sight Sensors, select Add Sensor/Device To Network in the System menu. Select the sensor (ism1020) in the network, then click Apply to close this window. 14. Connect to the camera but put it offline (click on the button if necessary). 15. Four pre-configured job files are provided on the Resource Kit DVD-ROM. Open the one entitled WA_3BK1BL.job. This job is made for white boxes and a recipe of 3 black marbles and 1 blue marble. Festo Didactic 86691-20 41
Tuning the Machine Vision System 16. Place a box filled with 3 black marbles and 1 blue marble right under the camera and press the Trigger ( ) button. You should obtain an image similar to Figure 44 in In-Sight Explorer. Align the tools regions of interest over the box edges by adjusting the camera vertical and horizontal position. You may have to make several tests to adjust the position of the camera correctly. Figure 44. Picture of a box with 4 marbles. 42 Festo Didactic 86691-20
17. If the edges of the marbles are not sharp on the pictures (Figure 45), rotate the lens barrel to adjust the camera focus. Figure 45. Blurred picture. 18. The list of the different tools that compose the WA_3BK1BL job is located in the Palette section (at the right of the screen) under the Results tab (Figure 46). Figure 46. Job Results (WA_3BK1BL). Festo Didactic 86691-20 43
The Edge_Bottom tool finds the bottom of the box in the image with the help of the Filter_Bottom tool that does point filtering in the area where Edge_Bottom is looking for an edge. The filter makes every pixel either black (0) or white (255) depending if it is above or below the Threshold value. The edge found then serves as Tool Fixture for the other tools. Pixel_Black is a tool that counts the number of dark pixels and returns a Pass result if this number falls between the minimum and maximum range limits. These limits are adjusted for the expected black pixels generated by the presence of three black marbles. Filter_Grey is a point filter that makes grey pixels turn black and other pixels turn white. The purpose of this tool is to make black marbles disappear. However, the contours of the black marbles remain. The Filter_Grey_Closing tool removes these contours, so that only blobs from grey marbles remain. Blobs_Grey returns a Pass result if it detects one blob. 19. If your image is not set properly, the image obtained can return a Fail result, even if the right number of marbles is in the box. In the example of Figure 47, the image is too clear, causing Pixel_Black to fail. Figure 47. Image too clear (Pixels_Black fails). 44 Festo Didactic 86691-20
If this happens, you can modify the camera exposure time. Go to View Application Steps Set Up Image and change the Exposure (msec) parameter (Figure 48). If your lighting conditions change, you may need to adjust the camera exposure time or the tools parameters from time to time. Figure 48. Editing camera exposure time. 20. Take pictures with different combinations of marbles (e.g., 2 black and 2 blue) to check the robustness of your tools. Adjust the tools parameters (e.g., Ranges) if necessary. 21. Before going online, verify that the strobe is set correctly. At the bottom of the Outputs section, set the signal type for output Direct 1 to Strobe. Click on Details, then set the Strobe/Light Control Trigger parameter to Falling Edge and the Strobe Start Position parameter to Acquisition Start. Using the Vision System with the FMS in motion 22. Click on the button to put the camera online. You are now ready to perform a test run on the FMS with the actual Machine Vision System configuration. Since it is the first time that you start the whole system, be prepared to stop it to make some adjustments. 23. Press the green push-button on the Indicator Light/Push-Button Station to start the system. If necessary, adjust the INSPECTION sensor to trigger the camera when boxes are in front of it. 24. Readjust the exposure time or the tools parameters until you always get a Pass result when a box containing the correct arrangement of marbles is inspected and a Fail result when a box is improperly filled. Festo Didactic 86691-20 45
25. Test the FMS. If the system is properly tuned, boxes containing the correct recipe are directed to trays 1 and 2, while the other boxes are directed to the end tray, as shown in Figure 49. Tray 1 End tray Tray 2 Figure 49. Boxes sorted in the tray of the FMS. A video of the setup presented in this Job Sheet is available on the Flexible Manufacturing System Resource Kit (student) DVD-ROM. 26. Ask your instructor to check and approve your work. Troubleshooting exercise a Prior to this exercise, the instructor must insert a fault into the FMS circuit. 46 Festo Didactic 86691-20
27. Try to use the setup and check if everything is working properly. If the system is not working properly, describe the symptom(s). 28. Use your troubleshooting skills to identify the malfunctioning module(s) and isolate the problem(s). 29. Explain in detail your approach to isolating the problem. 30. Ask your instructor to check and approve your work. Name: Date: Instructor's approval: Festo Didactic 86691-20 47