1. Trang chủ
  2. » Giáo Dục - Đào Tạo

Design and control gantry robot using twincat3 and image processing

75 6 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

MINISTRY OF EDUCATION AND TRAINING HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION GRADUATION THESIS AUTOMATION AND CONTROL ENGINEERING TECHNOLOGY DESIGN AND CONTROL GANTRY ROBOT USING TWINCAT3 AND IMAGE PROCESSING LECTURER: PHD TRAN MANH SON STUDENTS: VU DUC HAI TRAN VU HUNG SKL 010832 Ho Chi Minh City, July 2023 MINISTRY OF EDUCATION & TRAINING HO CHI MINH CITY UNIVERSITY OF TECHNOLOGY AND EDUCATION FACULTY FOR HIGH QUALITY TRAINING Graduation project report Design and Control Gantry Robot Using TwinCAT3 and Image Processing Students: Vu Duc Hai Student ID: 19151054 Tran Vu Hung Student ID: 19151057 Major: AUTOMATION AND CONTROL ENGINEERING Instructor: PhD Tran Manh Son Ho Chi Minh City, July 2023 THE SOCIALIST REPUBLIC OF VIETNAM Independence- Freedom- Happiness *** -Ho Chi Minh city, June , 2023 GRADUATION PROJECT ASSIGNMENT Student’s name: Vu Duc Hai Student’s name: Tran Vu Hung Major: Automation and Control Technology Advisor: PhD Tran Manh Son Date of assignment: 28/02/2022 Student’s ID number: 19151054 Student’s ID number: 19151057 Class: 19151CLA1 Phone number: Date of submission: 28/06/2023 Project title: Design and Control Gantry Robot Using IPC and Image Processing Initial materials provided by the advisor: Content of project: Design and control Gantry Robot to classify circular products (classified by diameters) Synchronous and interpolation position control are used to control Gantry Robot TwinCAT3 Motion Control is applied in this project to the control task The image processing program sent the type of products to the IPC throguh ADS By using TwinCAT3, the connection betweem the driver, I/O module and IPC is using EtherCAT The final results: Gantry Robot, electrical panels and thesis report CHAIR OF THE PROGRAM (Sign with full name) ADVISOR (Sign with full name) THE SOCIALIST REPUBLIC OF VIETNAM Independence- Freedom- Happiness *** Ho Chi Minh city, July ,2023 ADVISOR’S EVALUATION SHEET Student’s name: Vu Duc Hai Student’s ID number: 19151054 Student’s name: Tran Vu Hung Student’s ID number: 19151057 Major: Automation and Control Technology Project title: Design and Control Gantry Robot Using IPC and Image Processing Advisor: PhD Tran Manh Son EVALUATION: Content of the project: Strengths: Weaknesses: Approval for oral defense? (Approved or denied) Overall evaluation: Mark: In Word: Ho Chi Minh City, ADVISOR (Sign with full name THE SOCIALIST REPUBLIC OF VIETNAM Independence- Freedom- Happiness *** Ho Chi Minh city, July ,2023 PRE-DEFENSE EVALUATION SHEET Student’s name: Vu Duc Hai Student’s ID number: 19151054 Student’s name: Tran Vu Hung Student’s ID number: 19151057 Major: Automation and Control Technology Project title: Design and Control Gantry Robot Using IPC and Image Processing Advisor: PhD Tran Manh Son Name of reviewer: EVALUATION: Content and workload of the project: Strengths: Weaknesses: Approval for oral defense? (Approved or denied) Overall evaluation: Mark: In words: Ho Chi Minh City, ADVISOR (Sign with full name) THE SOCIALIST REPUBLIC OF VIETNAM Independence- Freedom- Happiness *** Ho Chi Minh city, July ,2023 EVALUATION SHEET OF DEFENSE COMMITTEE MEMBER Student’s name: Vu Duc Hai Student’s ID number: 19151054 Student’s name: Tran Vu Hung Student’s ID number: 19151057 Major: Automation and Control Technology Project title: Design and Control Gantry Robot Using IPC and Image Processing Name of Defense Committee Member: EVALUATION Content and workload of the project: Strengths: Weaknesses: Overall evaluation: Mark: In words: Ho Chi Minh City, COMMITTEE MEMBER (Sign with full name) GRADUATION THESIS ADVISOR: PhD Tran Manh Son GUARANTEE We hereby declare that the research results presented in this graduation project are the results obtained during our own research with the guidance of PhD Tran Manh Son, not copy any research results of other authors The research content has references and uses some information and documents from the sources listed in the list of references If wrong, we will be subject to all disciplinary measures as prescribed GRADUATION THESIS ADVISOR: PhD Tran Manh Son ACKNOWLEDGMENTS There is no success that is not tied to the direct or indirect support or help of others During the time from the beginning of studying at the university until now, the group has received a lot of attention and help from teachers, family and friends With the deepest and sincere gratitude, the group would like to thank all teachers, teachers of HCMC University of Technology and Education in general and teachers of the Faculty of Electrical and Electronics in particular, who wholeheartedly taught and equipped our group with important background knowledge and specialized knowledge, help our team have a solid theoretical basis and always create the best conditions for our team in the learning and research process And especially our team would like to sincerely thank the instructor – PhD Tran Manh Son During the implementation of the project, he spent a lot of time and enthusiasm in guiding, wholeheartedly guiding us through each talk, discussing the creative field in researching the topic Along with that is the dedication to help, enthusiastic guidance, imparting valuable knowledge and experience so that the team can successfully complete the graduation project The group would like to thank their family and friends for always supporting, helping and encouraging them throughout the process of implementing their graduation projects In addition, the group would also like to thank you for kindly guiding and answering questions so that the group can successfully complete this graduation project GRADUATION THESIS ADVISOR: PhD Tran Manh Son ABSTRACT I am pleased to present to you a report on the topic of "Gantry Robot" This is an important and captivating subject in the field of robotics and automation, and I hope that this report will provide you with detailed and insightful information about Gantry Robots and their applications in modern industries In the era of industrialization and modern technology, Gantry Robots have become vital tools in the process of manufacturing and operating automated assembly lines The flexibility, precision, and ability to work in harsh environments of Gantry Robots have brought significant benefits to businesses, ranging from increased productivity to reduced time and labor This report is divided into key sections, starting with an overview of the fundamental concepts of Gantry Robots, including their structure, operating principles, and important components Furthermore, we will explore practical applications of Gantry Robots in various industries such as automotive manufacturing, electronics, healthcare, and many others Finally, I would like to express my sincere appreciation for the interest and support provided by you throughout the research and writing process of this report It is my hope that this report will contribute to enhancing knowledge and understanding of Gantry Robots and their significant role in driving the development of modern industry and technology GRADUATION THESIS ADVISOR: PhD Tran Manh Son LIST OF CONTENTS GUARANTEE ACKNOWLEDGMENTS LIST OF CONTENTS LIST OF FIGURES LIST OF TABLES Chapter INTRODUCTION 1.1 Project aims 1.2 Scope of the project 11 1.3 Contents 11 Chapter THEORETIAL FOUNDATIONS 12 2.1 Definitions 12 2.1.1 Robot 12 2.1.2 Types of robots 13 2.2 Project robot 15 2.3 Industry PC (IPC) 16 2.5 Limitations of the topic 18 2.4 Overview about AC servo 19 2.4.1 Servo System 19 2.4.2 Servo motor 21 2.4.3 Encoder 22 2.5 Components information Error! Bookmark not defined 2.5.1 Servo motor and Servo drive 30 2.5.2 Step motor and Step drive 33 2.5.3 Sensor 35 2.6 TwinCAT Real-time 24 2.6.1 Real-time 24 2.6.2 Real-time capable scheduling 25 2.6.3 Exemplary representation of the call of a PLC task 25 2.6.4 Preemptive multitasking 26 2.6.5 Direct hardware access 26 2.6.6 Schematic representation of the TwinCAT runtime environment 26 GRADUATION THESIS ADVISOR: PhD Tran Manh Son Figure 3: Add new axes Setting for axis Summary parameters of x and y axis: 55 GRADUATION THESIS ADVISOR: PhD Tran Manh Son Parameters of axis Axis Length Step of Ball Screw Revolution Speed of Servo x 345mm 5mm/round 22 bits (Single-turn absolute) 5000RPM y 300mm 5mm/round 22 bits (Single-turn absolute) 5000RPM z 250mm 10mm/round 4096counts/rev (step servo) 3000RPM Table 1: Parameters of axis  Scaling Factor Numerator and denominator (mm/INC): This is a step of ball screw This parameter will be used to calculate resolution (default: 1.0), The scaling factor is subdivided into a numerator and a denominator It converts displacement increments into axis positions or calculates a user unit out of encoder increments  Encoder Sub mask: The encoder submask defines the number of increments per motor turn  Reference velocity and Maximum velocity (mm/min): this parameter can be set based on this equation: Maximum _ vel  Rated _ vel  Re v(mm / min) Figure 4: Setting for x and y axis 56 GRADUATION THESIS ADVISOR: PhD Tran Manh Son Figure 5: Setting for z axis 4.1.3 CANopen protocol In the General tab of Enc setting, we can see that the Encoder type is written “Encoder CANopen DS402/MDP 513 (e.g AX2xxx-B1x0/B510)” Therefore, there will be an overview of CANopen protocol in this report Figure 6: Encoder type 4.1.3.1 CAN protocol concept CAN (Controller Area Network) is a message-based protocol that supports real-time control systems; is a broadcast digital bus with many masters Up to 2032 devices can be linked on a single network with high-speed communication rates up to Mbits/s The CAN network is made up of a group of nodes, each of which can communicate with any other node in the network The communication is done by transmitting and receiving data packets 57 GRADUATION THESIS ADVISOR: PhD Tran Manh Son – called messages Each message type in the CAN network is assigned an ID - an identifier - depending on the priority of that message Figure 7: CAN bus protocol concept The CAN protocol is a message-based protocol that allows multiple electronic control units (ECUs) to communicate with each other over a shared bus It uses a differential two-wire bus (CAN_H and CAN_L) for communication, which allows for noise immunity and longdistance communication The cable technology of the CAN network has simple wiring, and data transmission is accomplished by a pair of differential signals The bus line terminates with a 120-ohm resistor at each end And have the following structure diagram: Figure 8: CAN protocol overview CAN bus physical and data link layer: The CAN bus physical layer defines things like cable types, electrical signal levels, node requirements, cable impedance etc For example, ISO 11898-2 dictates a number of things, including below  Baud rate: CAN nodes must be connected via a two-wire bus with baud rates up to Mbit/s (Classical CAN) or Mbit/s  Cable length: Maximal CAN cable lengths should be between 500 meters (125 kbit/s) and 40 meters (1 Mbit/s) 58 GRADUATION THESIS ADVISOR: PhD Tran Manh Son  Cable length: Maximal CAN cable lengths should be between 500 meters (125 kbit/s) and 40 meters (1 Mbit/s) The CAN interface is a type of packet communication system (message base system), where each node is assigned an ID The packet communication system is more open because adding or removing a node or replacing a group of nodes with a more complex node does not affect the whole system Distributed control system based on CAN communication network is open, easy to change without having to redesign the whole system Each node can receive many different types of messages, whereas a message can be received by many nodes and the work is done synchronously in a distributed system Type of CAN frame: CAN data is transmitted as frames of four types which are date frame, Remote frame, Error frame and Overflow frame 4.1.3.2 CANopen protocol in TwinCAT3 The CANopen protocol is automatically chose (Encoder type) when scanning devices in TwinCAT3, these parameters should not be changed to prevent error in connection CANopen defines several communication classes for the input and output data (process data objects):  Event driven: Telegrams are sent as soon as their contents have changed This means that the process image is not continuously transmitted, only its changes  Cyclic synchronous: A SYNC telegram causes the modules to accept the output data that was previously received, and to send new input data  Requested: A CAN data request telegram causes the modules to send their input data  For the hardware connection, connect the encoder cable of the servo moto CSMA04BT to pin of the servo driver Figure 9: Pin 7, Encoder signal is fed into this connector 59 GRADUATION THESIS ADVISOR: PhD Tran Manh Son 4.2 EtherCAT 4.2.1 A brief overview of EtherCAT EtherCAT is standfor Ethernet for control automation and technology Ethernet communication was adopted in the automation industry to communicate between different computing nodes on the shop floor This mode of communication was later also developed in order to communicate with lower level actuators, motors, sensors, modules etc Various different protocols were developed which basically created a communication framework for automation companies to adapt for their individual products This enabled automation integrators to use products from different companies in the same automation system since all the products followed the same communication protocol and therefore could communicate with each other In summary, to answer for the fundamental question, Why choosing EtherCAT instead of others The answer lies mainly in the determination or precision of time EtherCAT is one of the fastest ethernet communication-based protocols in the market Cycle times can be as fast as a few nanoseconds and therefore more instructions can be sent out to nodes such as servo drives in lesser time It can be understood in slang that “Ethernet on dopamine” Figure 10: EtherCAT performance Physical layer of EtherCAT protocol: As we known, The OSI model is a conceptual framework which any networking protocol can follow in order to build the entire networking system The networking system using OSI model can be spit into layers, but the EtherCAT communication protocols skips layer 3,4 and Therefore EtherCAT protocol achieve faster cycle times and lower jitter All of this and other aspects of the 60 GRADUATION THESIS ADVISOR: PhD Tran Manh Son protocol is how EtherCAT was able to reduce Ethernet's 10 ms cycle time by a large number of orders of magnitude, and it resulted in an effective data rate of 100 Mbps Figure 11: EtherCAT and OSI model The physical layer is the hardware that physically transmits data over the network This is the core power, i.e the “mechanical” level of the network The data link layer is where data is encoded into packets The Ethernet implementation here is fine, and EtherCAT uses it But then other layers known to Ethernet users like the Network layer (IP) and the transport layer (TCP and UDP) were completely ignored by EtherCAT because it cares about cycle times 4.2.2 EtherCAT in TwinCAT3 Hardware connection In this project, the IPC, EtherCAT Coupler EK1100 and three Servo Drivers are connected using EtherCAT, to this, connect pin “ECAT OUT” to “ECAT IN” (of another device) Here is a connection diagram 61 GRADUATION THESIS ADVISOR: PhD Tran Manh Son Figure 12: EtherCAT connection diagram To check the connection is established, open TwinCAT XAE and create new project Open the tab “TwinCAT” and choose function Scan Figure 13: Scanning device in TwinCAT After that, all the device that connected to the IPC will be automatically shown in the I/O module The mapping between the driver and the axis will also automatically established, but action need to be taken to mapping properly between the driver for each axis 62 GRADUATION THESIS ADVISOR: PhD Tran Manh Son Figure 14: Devices are shown in I/O 63 GRADUATION THESIS ADVISOR: PhD Tran Manh Son Chapter EXPERIMENT RESULTS, COMMENT AND EVALUATION 5.1 Result The project Gantry robot meets the following requirements:        Go home XYZ axes Run Jog run Data to the standby position Go to basic position and pre-set position Run in two mod: Manual and Auto The Sensors actives stably Camera working stably Conveyor run stably with the constant speed The robot operates smoothly and stably Good application of IPC in system control The camera can detect the diameter of the product and give feed back to IPC via ADS method Using the laptop’ screen to make a HMI Figure 1: Gantry Robot (top view) 64 GRADUATION THESIS ADVISOR: PhD Tran Manh Son Figure 2: Gantry Robot (front view) In the monitoring screen, the supervisor can customize between automatic and manual modes Can also monitor the current position of the axes in real time and provide an emergency stop function button Figure 3: HMI of project 65 GRADUATION THESIS ADVISOR: PhD Tran Manh Son In terms of image processing, product classification is relatively good, but there are still occasional cases of error identification, only about 5% error Figure 4: Correct product identification Figure 5: Wrong product identification 5.2 Comment and Evaluation After a period of researching, designing and programming the operating supervision for the model, our team has collected predetermined results The model has the following advantages and disadvantages: Advantages:      Control up to servo motors, can run all three axes interpolation Camera works stably, no interference The axes work stably, the product are properly dropped into the boxes Flexible product with difference diameter Wide range of operation Disadvantages:  Need to calibrating the distance of camera and conveyor  Image processing has many limitations: remove fonts, product colors  Distance of the magnet and product is too close 66 GRADUATION THESIS ADVISOR: PhD Tran Manh Son  There is vibration during operation Chapter CONCLUSION AND RECOMMANDATION 6.1 Conclusion In summary, the Gantry Robot operates without error, the state error is under 2% and there is no overshoot In the picking phase, robot works perfectly, the electrical magnet works fine At first team had thought that the electrical magnet will not be trigger on time (it may be delay), but it is not happening In the placing phase, the robot can place in the proper position, if the load box number is occupied, the robot can automatically place products in the different load box (that have the same type) About the image processing, there might be some error in measuring the diameter of circular product (error is under 2mm), so the permissible error is set 3mm Therefore, it can classify products correctly The HMI can display all data such as the speed of the x,y and z axis or the current position of the the end-effector, or the number of product and the product types In terms of mechanical part, there is vibration in the z axis, this is because of the coupling of x and y axis, they are not fit perfectly into the ball-screw This problem can be solved by afford the new coupling that suitable with the ball-screw Overall, the Gantry robot meets the requirements, though there are still some points need to improve such as the HMI, enhance the algorithm to detect circular product witho the permissible error is equal to zero 6.2 Recommendation  Enhance the mechanical structure to eliminate the vibration of the robot, therefore increasing the accuracy of the model  Enhance the algorithm to detect circular product witho the permissible error is equal to zero  The HMI can display all necessary data but still difficult to use The live webcam cannot merge into the HMI, any ideas to make the HMI more usable is recommended 67 GRADUATION THESIS ADVISOR: PhD Tran Manh Son REFERRENCES [1] EtherCAT based motion controller - ROHAN KELKAR [2] Saif, Jamil Abudhamid Mohammed & Hammad, Mahgoub & Alqubati, Ibrahim (2016) Gradient Based Image Edge Detection International Journal of Engineering and Technology 153-156 10.7763/IJET.2016.V6.876 [3] MACHINE VISION - Ramesh Jain, Rangachar Kasturi, Brian G Schunck [4] https://infosys.beckhoff.com/ [5] Graduation thesis: XÂY DỰNG VÀ ĐIỀU KHIỂN MÁY CNC DÙNG G-CODE TRONG MẠNG SSCNET, PHÂN BIỆT CÁCH THỨC GIA CÔNG SẢN PHẨM BẰNG MÃ VẠCH Advisor: ThS Le Hoang Lam [6] GANTRY ROBOT With linear motor technology Autor: Doral Vall, Judith Tutor: Lahtinen, Teijo [7] Gantry Robot Kinematic Analysis User Interface Based on Visual Basic and MATLAB Mahir Abdelwahid Ibrahim Ismail , Mohammed Khalafalla Mohammed [8] https://indiantechwarrior.com/canny-edge-detection-for-image-processing/ 68

Ngày đăng: 28/12/2023, 18:51

Xem thêm:

w