Motion Control for Newbies. Featuring Maxon EPOS2 P
Total Page:16
File Type:pdf, Size:1020Kb
Urs Kafader Motion Control for Newbies. Featuring maxon EPOS2 P. First Edition 2014 © 2014, maxon academy, Sachseln This work is protected by copyright. All rights reserved, including but not limited to the rights to translation into foreign languages, reproduction, storage on electronic media, reprinting and public presentation. The use of proprietary names, common names etc. in this work does not mean that these names are not protected within the meaning of trademark law. All the information in this work, including but not limited to numerical data, applications, quantitative data etc. as well as advice and recommendations has been carefully researched, although the accuracy of such information and the total absence of typographical errors cannot be guaranteed. The accuracy of the information provided must be verified by the user in each individual case. The author, the publisher and/or their agents may not be held liable for bodily injury or pecuniary or property damage. Version 1.2, February 2014 2 Motion Control for Newbies, featuring maxon EPOS2 P Motion Control for Newbies Featuring maxon EPOS2 P Intention and approach The basic approach of this textbook, like many, is a practical and experimental one; however, it is reversed from most. Instead of first explaining the theory of motion control and then applying it to specific examples, here we will start with hands-on exp erimenting on a real maxon EPOS2 P positioning control system by means of the EPOS Studio software and explain all the relevant motion control principles/features as they appear on the journey. Therefore, the text contains mainly the exercises and practical work to do. Background information can be found in the colored boxes. This is primarily a textbook about motion control and not about programming a PLC. Therefore, the programming part should be considered as an introduction on how to program the motion control aspects. It is not a full PLC programming course. Motion control is mechatronics. It is the combination of mechanics and electronics, of actuators (motors) and sensors all controlled by software. In this textbook, we identify and define the role, behavior and mutual interaction of the different elements of a motion control system. However, we need to know the basic internal construction and working principles of the elements only to a limited extent, but rather look at them as a black box. Given a certain input, what comes out of the box? How is this output generated and which parameter can be used to influence the output? For instance, we will not explain how feed forward control must be implemented, but we will explain the basic idea of it and how the parameters will look during axis tuning. As a system to evaluate these things in a practical hands-on manner, we use the EPOS2 P Starter Kit and the maxon EPOS Studio software. Motion Control for Newbies, featuring maxon EPOS2 P 3 Table of Content Motion Control for Newbies .................................................................................................. 3 Intention and approach ................................ ................................ ................................ ......... 3 Boxes 6 Part 1: Preparation ................................................................................................................. 7 1 Setting-up the EPOS2 P Starter Kit .............................................................................. 7 1.1 Installation of EPOS Studio software ................................ ................................ ....... 8 1.2 Connecting the cables ................................ ................................ ............................ 10 1.3 What’s in the black box? ................................ ................................ ........................ 11 1.4 Starting the EPOS Studio ................................ ................................ ....................... 14 2 Preparing the motion control system......................................................................... 19 2.1 Startup Wizard ................................ ................................ ................................ ........ 19 2.2 Tuning ................................ ................................ ................................ ..................... 28 Part 2: The Motion Controller.............................................................................................. 35 3 Exploring the Motion Controller ................................................................................. 36 3.1 Profile Position Mode ................................ ................................ .............................. 36 3.2 Homing ................................ ................................ ................................ ................... 44 3.3 Position Mode ................................ ................................ ................................ ......... 46 3.4 Profile Velocity Mode ................................ ................................ .............................. 48 3.5 Velocity Mode ................................ ................................ ................................ ......... 51 3.6 Current Mode ................................ ................................ ................................ .......... 52 4 Using the I/O Monitor tool ........................................................................................... 53 4.1 Outputs ................................ ................................ ................................ ................... 53 4.2 Inputs ................................ ................................ ................................ ...................... 54 5 Alternative Operating Modes (optional)..................................................................... 57 5.1 Analog set value ................................ ................................ ................................ ..... 57 5.2 Master Encoder Mode: Electronic gearhead ................................ .......................... 59 5.3 Step Direction Mode ................................ ................................ ............................... 59 Intermezzo: CAN and CANopen.......................................................................................... 61 6 An introduction to CANopen and CAN....................................................................... 61 6.1 CAN ................................ ................................ ................................ ........................ 62 6.2 CANopen ................................ ................................ ................................ ................ 62 6.3 CANopen device profile ................................ ................................ .......................... 63 6.4 EPOS2 [internal] Object Dictionary tool ................................ ................................ 67 6.5 EPOS2 P Object Dictionary ................................ ................................ .................... 70 6.6 Parameter Up - and Download ................................ ................................ ................ 70 6.7 Communication ................................ ................................ ................................ ....... 71 4 Motion Control for Newbies, featuring maxon EPOS2 P Part 3: The PLC (Programmable Logic Controller)........................................................... 73 7 Starting the programming tool ................................................................................... 74 7.1 Sample project: Simple Motion Sequence ................................ ............................. 75 7.2 The project files ................................ ................................ ................................ ...... 79 8 My first program: AxisMotion ..................................................................................... 88 8.1 Preparation work ................................ ................................ ................................ .... 90 8.2 Programming the basic steps................................................................................. 94 8.3 Programming more motion................................................................................... 106 9 Homing and IOs.......................................................................................................... 110 9.1 Configuring the IOs ................................ ................................ .............................. 110 9.2 Homing with limit switch ................................ ................................ ....................... 112 9.3 Setting outputs according to the axis state ................................ .......................... 113 9.4 Reading inputs ................................ ................................ ................................ ..... 115 10 Self-made Function Blocks ....................................................................................... 116 10.1 Creating a Function Block .................................................................................... 116 10.2 Programming in Function Block Diagram (FBD).................................................. 117 10.3 Using self-made Function Blocks......................................................................... 120 Part 4: Appendices, References and Index ..................................................................... 121 11 Appendices ................................................................................................................