Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Theory and design of CNC systems
Nội dung xem thử
Mô tả chi tiết
Springer Series in Advanced Manufacturing
Series Editor
Professor D.T. Pham
Manufacturing Engineering Centre
Cardiff University
Queen’s Building
Newport Road
Cardiff CF24 3AA
UK
Other titles in this series
Assembly Line Design
B. Rekiek and A. Delchambre
Advances in Design
H.A. ElMaraghy and W.H. ElMaraghy (Eds.)
Effective Resource Management in Manufacturing Systems:
Optimization Algorithms in Production Planning
M. Caramia and P. Dell’Olmo
Condition Monitoring and Control for Intelligent Manufacturing
L. Wang and R.X. Gao (Eds.)
Optimal Production Planning for PCB Assembly
W. Ho and P. Ji
Trends in Supply Chain Design and Management: Technologies and Methodologies
H. Jung, F.F. Chen and B. Jeong (Eds.)
Process Planning and Scheduling for Distributed Manufacturing
L. Wang and W. Shen (Eds.)
Collaborative Product Design and Manufacturing Methodologies and Applications
W.D. Li, S.K. Ong, A.Y.C. Nee and C. McMahon (Eds.)
Decision Making in the Manufacturing Environment
R. Venkata Rao
Frontiers in Computing Technologies for Manufacturing Applications
Y. Shimizu, Z. Zhang and R. Batres
Reverse Engineering: An Industrial Perspective
V. Raja and K.J. Fernandes (Eds.)
Automated Nanohandling by Microrobots
S. Fatikow
A Distributed Coordination Approach to Reconfigurable Process Control
N.N. Chokshi and D.C. McFarlane
ERP Systems and Organisational Change
B. Grabot, A. Mayère and I. Bazet (Eds.)
Machining Dynamics
K. Cheng (Ed.)
ANEMONA
V. Botti and A. Giret
Suk-Hwan Suh • Seong-Kyoon Kang
Dae-Hyuk Chung • Ian Stroud
Theory and Design
of CNC Systems
123
Suk-Hwan Suh, PhD
School of Mechanical & Industrial
Engineering
POSTECH, San 31, Pohang, 790-784
Republic of Korea
Seong-Kyoon Kang, PhD
K&S International Patent and Law Firm
3F, Hanjin Bldg., 607-12 Yeoksam-dong,
Kangnam-gu, Seoul, 135-907
Republic of Korea
Dae-Hyuk Chung, PhD
Doosan Infracore Co., Ltd.
601-3, Namsan-dong, Changwon-Si,
Gyeongnam-Do
Republic of Korea
Ian Stroud, PhD
École Polytechnique Fédérale
de Lausanne (EPFL)
STI-IGM-LICP, Station 9,
1015 Lausanne
Switzerland
ISBN 978-1-84800-335-4 e-ISBN 978-1-84800-336-1
DOI 10.1007/978-1-84800-336-1
Springer Series in Advanced Manufacturing ISSN 1860-5168
British Library Cataloguing in Publication Data
Theory and design of CNC systems. - (Springer series in
advanced manufacturing)
1. Machine-tools - Numerical control 2. Machine-tools -
Numerical control - Programming
I. Suh, Suk-Hwan
621.9'023'0285
ISBN-13: 9781848003354
Library of Congress Control Number: 2008928587
© 2008 Springer-Verlag London Limited
Apart from any fair dealing for the purposes of research or private study, or criticism or review, as permitted
under the Copyright, Designs and Patents Act 1988, this publication may only be reproduced, stored or
transmitted, in any form or by any means, with the prior permission in writing of the publishers, or in the case
of reprographic reproduction in accordance with the terms of licences issued by the Copyright Licensing
Agency. Enquiries concerning reproduction outside those terms should be sent to the publishers.
The use of registered names, trademarks, etc. in this publication does not imply, even in the absence of a
specific statement, that such names are exempt from the relevant laws and regulations and therefore free for
general use.
The publisher makes no representation, express or implied, with regard to the accuracy of the information
contained in this book and cannot accept any legal responsibility or liability for any errors or omissions that
may be made.
Cover design: eStudio Calamar S.L., Girona, Spain
Printed on acid-free paper
9 8 7 6 5 4 3 2 1
springer.com
This book is dedicated to:
Eun-Sook Choi,
Hyeon-Jeong Lee,
Hye-Jung Kim,
and Hildegarde Nagy-Stroud
and to the rest of our families
for their endurance of this headlong task.
Preface
CNC controllers, working as a brain for manufacturing automation, are high valueadded products accounting for over 30% of the price of machine tools. CNC technology is generally considered as a measure of the level of manufacturing technology of
a nation, and is currently led by major advanced countries such as USA, Japan, and
Germany. CNC technology, which cannot be developed with one single technology
but needs to integrate computer technology, hardware technology, machining technology, and so on, is often referred to as “The Flower of Industrial Technology”, and
requires a strategic long-term support, mostly on a governmental level.
Despite its significant role, textbooks on CNC controllers are quite rare worldwide, with a few published in the 1970s and some later. However, the earlier ones
mostly deal with conventional technologies, while the later ones deal with fragmental
contents, mostly focusing on part programming and machine operation. This book
is written by several authors in collaboration who have long experience in CNC development, education, and research, and is designed as a highly focused textbook
to provide knowledge on the principles and development technologies of CNC controllers. Therefore, this book can be used as a main textbook for courses related to
CNC in such departments as mechanical engineering, precision engineering and control engineering, and as a guide for those working on CNC development in industry.
If highly descriptive portions are taken out, it can also be used as lecture material in
technical colleges.
The framework of industrial CNC controllers has been established by integrating the structure and element technologies of CNC controllers under research and
development by the authors in their respective field of industry and academia over
the years. Furthermore, this book intends to encourage the spirit of development by
introducing actual realization cases.
This book is composed of two parts with a total of 11 chapters: Part I is composed
of Chapters 1–6 on the principle and design of CNC, and Part II is composed of an
open-architectural soft CNC system. Specifically, Chapter 1 provides general concepts and mechanisms of numerically controlled machines, while Chapters 2 through
5 cover the element technologies of NCK in charge of controlling the transfer axis,
including interpreter, interpolator, control of acceleration and deceleration, and povii
viii Preface
sition control system. In Chapter 6, NCK development cases are described together
with source code. Therefore, those who are interested in motion controllers can develop independent control devices by referring to the contents of Chapters 2 through
6.
Part II describes the open-architectural soft CNC system, including the principles
of major modules of numerically controlled machines, except the NCK (dealt with in
Part 1), and the system design process for the composition of the overall system from
the perspective of open-architectural soft CNC systems. Specifically, Chapter 7 explains the PLC, controlling most mechanical motions except the transfer axis, while
Chapter 8 presents the principles of the Man-Machine Interface (MMI) and the major modules for the development of conversational programming methods. Real-time
operation concepts and methods necessary for designing real-time controllers are described in Chapter 9, Chapter 10 describes the architecture design of CNC systems
based on personal computers. This is discussed from the perspective of soft CNC,
including several approaches to the architecture of open-style CNC system with free
external interfaces, and the design process of those approaches. The concept and primary elements of STEP-NC are introduced in Chapter 11, which has recently come
under the spotlight as a method of realizing intelligent CNC machines. Therefore,
those who are interested in designing and realizing open-style soft CNC devices can
refer to the topics covered in Chapters 7 through 11 to materialize intelligent openstyle NC devices.
As authors of this book, we recommend that instructors have their students actually code the NCK technologies (Chapters 2 through 5), which are the core elements, and finish a computer simulation system, one similar to the development case
covered in Chapter 6, and verify the performance. One step further, if the interface
board (encoder signal and PLC signal processing) and the XY-table can actually be
connected by the students, the effect of learning can be doubled.
Those students who want to learn the general technologies related with CNC systems can achieve their goals by studying the PLC, conversational programming system, particularly actual cases of system programming methods to realize soft CNC,
as covered in Part 2, Chapters 7 through 11.
To complete this book it took over three years to collect and organize all sorts of
material accumulated over a period of many years, including technical papers and
patent data materials. However, we feel there are many shortcomings. Some of the
excuses we can offer could include the fact that CNC technology has been developed
by industry itself and that each element technology derives from a completely different domain of knowledge. Therefore, for integrating them under the umbrella of
CNC for academic purposes, many problems are posed such as un- or mis-defined
technical terminologies and lack of systematic knowledge bases. However, despite
this, the authors decided to publish this book in the hope that it will contribute to the
advancement of CNC technology both at home and abroad, in consideration of the
sheer reality that no proper textbooks are available for education or training in CNC
technology. With lots of input from the readers, we hope this book can improve its
contents in the future.
Preface ix
This book was originally published in Korean and has now been translated into
English. We would like to take this opportunity to express our appreciation to Ms.
Eunsook Choi, who encouraged preparation of the English version of the original
Korean text book, Mr. Suho Jung and students of the Center for ubiquitous manufacturing at POSTECH for help in the editing, and Springer who willingly accepted
publication of it.
We would also like to express our appreciation to Dae-Jung Seong of Doosan
Infracore in charge of CNC development for providing contemporary industrial perspectives.
Postech, Suk-Hwan Suh, Seong-Kyoon Kang,
March 2008 Dae-Hyuk Chung, Ian Stroud
Contents
Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Part I Principles and NCK Design of CNC Systems
1 Introduction to NC Systems ..................................... 3
1.1 Introduction . . ............................................. 3
1.2 The History of NC and NC Machine Tools . . . . . . . . . . . . . . . . . . . . . 6
1.3 CNC Driving System Components . . . ......................... 8
1.3.1 Driving Motor and Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.3.2 Linear Movement Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.3.3 Coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.4 CNC Control Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.4.1 Semi-closed Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.4.2 Closed Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
1.4.3 Hybrid Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.4.4 Open Loop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.5 The Components of the CNC system . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.5.1 MMI Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
1.5.2 NCK Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
1.5.3 PLC Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.5.4 Real-time Control System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
1.6 The Progress Direction of the CNC System . . . . . . . . . . . . . . . . . . . . . 29
1.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
2 Interpreter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
2.2 Part Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
2.2.1 Program Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
2.2.2 Main Programs and Subprograms. . . . . . . . . . . . . . . . . . . . . . . 39
2.3 Main CNC System Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
2.3.1 Coordinate Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
xi
xii Contents
2.3.2 Interpolation Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
2.3.3 Feed Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
2.3.4 Tools and Tool Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
2.3.5 Spindle Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
2.3.6 Fixed-cycle Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
2.3.7 Skip Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.3.8 Program Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
2.3.9 Advanced Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
2.4 G&M-code Interpreter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
2.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3 Interpolator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
3.2 Hardware Interpolator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
3.2.1 Hardware Interpolation DDA . . . . . . . . . . . . . . . . . . . . . . . . . . 71
3.2.2 DDA Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.3 Software Interpolator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
3.3.1 Software Interpolation Methods . . . . . . . . . . . . . . . . . . . . . . . . 78
3.3.2 Sampled-Data Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
3.4 Fine Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
3.5 NURBS Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
3.5.1 NURBS Equation Form . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
3.5.2 NURBS Geometric Characteristics . . . . . . . . . . . . . . . . . . . . . 100
3.5.3 NURBS Interpolation Algorithm . . . . . . . . . . . . . . . . . . . . . . . 101
3.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
4 Acceleration and Deceleration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107
4.2 Acc/Dec Control After Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
4.2.1 Acc/Dec Control by Digital Filter . . . . . . . . . . . . . . . . . . . . . . 109
4.2.2 Acc/Dec Control by Digital Circuit . . . . . . . . . . . . . . . . . . . . . 112
4.2.3 Acc/Dec Control Machining Errors . . . . . . . . . . . . . . . . . . . . . 121
4.2.4 Block Overlap in ADCAI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
4.3 Acc/Dec Control Before Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . 128
4.3.1 Speed-profile Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
4.3.2 Block Overlap Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132
4.3.3 Corner Speed of Two Blocks Connected by an Acute Angle 142
4.3.4 Corner Speed Considering Speed Difference of Each Axis . . 144
4.4 Look Ahead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
4.4.1 Look-Ahead Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
4.4.2 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
4.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Contents xiii
5 PID Control System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
5.2 The Servo Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
5.3 Servo Control for Positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
5.4 Position Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
5.4.1 PID Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
5.4.2 PID Gain Tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
5.4.3 Feedforward Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
5.5 Analysis of the Following Error. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
5.5.1 The Following Error of the Feedback Controller . . . . . . . . . . 179
5.5.2 The Following Error of the Feedforward Controller . . . . . . . . 182
5.5.3 Comparison of Following Errors . . . . . . . . . . . . . . . . . . . . . . . 183
5.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
6 Numerical Control Kernel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
6.2 Architecture of ACDAI-type NCK . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
6.2.1 Implementation of the Interpolator . . . . . . . . . . . . . . . . . . . . . . 188
6.2.2 Implementation of the Rough Interpolator. . . . . . . . . . . . . . . . 193
6.2.3 Implementation of an Acc/Dec Controller . . . . . . . . . . . . . . . . 199
6.2.4 Implementation of Fine Interpolator. . . . . . . . . . . . . . . . . . . . . 203
6.2.5 Implementation of the Position Controller. . . . . . . . . . . . . . . . 208
6.3 Architecture of an ADCBI-type NCK . . . . . . . . . . . . . . . . . . . . . . . . . . 211
6.3.1 Implementation of the Look-Ahead Module . . . . . . . . . . . . . . 213
6.3.2 Implementation of an Acc/Dec Controller . . . . . . . . . . . . . . . . 215
6.3.3 Implementation of the Rough Interpolator. . . . . . . . . . . . . . . . 222
6.3.4 The Mapping Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
6.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Part II Open-architectural Soft CNC Systems
7 Programmable Logic Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
7.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
7.2 PLC Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
7.3 PLC Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
7.4 Machine Tool PLC Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
7.5 PLC System Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
7.5.1 Software Model and Communication Model. . . . . . . . . . . . . . 242
7.5.2 Programming Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
7.5.3 User Programming Languages . . . . . . . . . . . . . . . . . . . . . . . . . 245
7.6 Soft PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
7.7 PLC Configuration Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
7.7.1 PLC System Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
7.7.2 Executor Programming Sequence . . . . . . . . . . . . . . . . . . . . . . . 253
7.7.3 Executor Implementation Example . . . . . . . . . . . . . . . . . . . . . 254
xiv Contents
7.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
8 Man–Machine Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
8.1 MMI Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
8.1.1 Area for Status Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
8.1.2 Area for Data Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
8.1.3 Area for MPG Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
8.1.4 Area for Machine Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
8.2 Structure of the MMI System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
8.3 CNC Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
8.3.1 The Sequence of Part Programming . . . . . . . . . . . . . . . . . . . . . 278
8.3.2 Manual Part Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
8.3.3 Automatic Part Programming . . . . . . . . . . . . . . . . . . . . . . . . . . 280
8.4 Mazatrol Conversational System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
8.4.1 Turning Conversational System . . . . . . . . . . . . . . . . . . . . . . . . 289
8.4.2 Programming Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
8.5 Conversational Programming System Design . . . . . . . . . . . . . . . . . . . 294
8.5.1 Main Sequence for Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
8.5.2 Key Design Factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
8.6 Development of the Machining Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . 305
8.6.1 Turning Fixed Cycle. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
8.6.2 Turning Cycle for Arbitrary Shape . . . . . . . . . . . . . . . . . . . . . . 306
8.6.3 Corner Machining Cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
8.6.4 Drilling Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
8.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314
9 CNC Architecture Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
9.2 Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317
9.3 Real-time Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 319
9.4 Structure of a Real-time OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 321
9.5 Process Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
9.5.1 Process Creation and Termination . . . . . . . . . . . . . . . . . . . . . . 324
9.5.2 Process State Transition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
9.5.3 Process Scheduling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325
9.6 Process Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
9.6.1 Semaphores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
9.6.2 Using Semaphores . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
9.6.3 Events and Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
9.7 Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
9.7.1 System Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334
9.7.2 Mutual Exclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
9.7.3 Deadlock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
9.8 Inter-process Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
9.8.1 Shared Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
Contents xv
9.8.2 Message System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338
9.9 Key Performance Indices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
9.9.1 Task Switching Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
9.9.2 Context Switching Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
9.9.3 Semaphore Shuffling Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
9.9.4 Task Dispatch Latency Time . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
9.10 Hardware and Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
9.10.1 Architecture of Multi-processing Hardware . . . . . . . . . . . . . . 344
9.10.2 Operating System Configuration. . . . . . . . . . . . . . . . . . . . . . . . 347
9.10.3 CNC System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
9.11 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
10 Design of PC-NC and Open CNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
10.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
10.2 Design of Software Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
10.2.1 CNC System Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
10.3 Design of Soft-NC System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
10.3.1 Design of Task Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359
10.3.2 Design of the System Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . 361
10.3.3 PLC Program Scanning and Scheduling . . . . . . . . . . . . . . . . . 362
10.3.4 Task Synchronization Mechanism . . . . . . . . . . . . . . . . . . . . . . 365
10.3.5 Inter-Task Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 369
10.4 Motion Control System Programming Example . . . . . . . . . . . . . . . . . 376
10.4.1 Design of System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . 377
10.4.2 Creating Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
10.4.3 Task Synchronization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
10.4.4 Task Priority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
10.4.5 Inter-Task Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
10.4.6 Create Event Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
10.5 Open-CNC Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
10.5.1 Closed-type CNC Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387
10.5.2 Open CNC Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
10.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393
11 STEP-NC System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
11.2 Background of STEP-NC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
11.2.1 Problems with G&M Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
11.2.2 Historical Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
11.3 STEP-NC: A New CNC Interface Based on STEP . . . . . . . . . . . . . . . 399
11.3.1 Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
11.3.3 Objectives and Impacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
11.4 STEP-NC Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
11.4.1 Part 1: Overview and Fundamental Principles. . . . . . . . . . . . . 403
11.3.2 Relationship Between STEP and STEP-NC . . . . . . . . . . . . . . . 399
xvi Contents
11.4.2 Part 10: General Process Data . . . . . . . . . . . . . . . . . . . . . . . . . . 405
11.4.3 Part 11: Process Data for Milling . . . . . . . . . . . . . . . . . . . . . . . 407
11.4.4 Part 12: Process Data for Turning . . . . . . . . . . . . . . . . . . . . . . . 407
11.4.5 Tools for Milling and Turning . . . . . . . . . . . . . . . . . . . . . . . . . . 408
11.5 Part Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 410
11.5.1 Part Programming for the Milling Operation . . . . . . . . . . . . . 411
11.5.2 Part Programming for the Turning Operation . . . . . . . . . . . . . 414
11.6 STEP-CNC System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
11.6.1 Types of STEP-CNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
11.6.2 Intelligent STEP-CNC Systems . . . . . . . . . . . . . . . . . . . . . . . . 418
11.7 Worldwide Research and Development . . . . . . . . . . . . . . . . . . . . . . . . 422
11.7.1 WZL-Aachen University (Germany) . . . . . . . . . . . . . . . . . . . . 422
11.7.2 ISW-University of Stuttgart (Germany) . . . . . . . . . . . . . . . . . . 424
11.7.3 POSTECH (South Korea) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
11.7.4 Ecole Polytechnic F´ed´erale of Lausanne (Switzerland) . . . . . 426
11.7.5 University of Bath (UK) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
11.7.6 NIST (USA) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
11.8 Future Prospects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
A Turning and Milling G-code System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
A.1 Turning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
A.2 Milling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
A.3 Classification of G-code Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 437
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447