Computer Numerical Control: Fundamentals and Programming
Computer Numerical Control: Fundamentals and Programming
NUMERIC
COMPUTERIZED
FUNDAMENTALS & PROGRAMMING
1st EDIÇ AH
@ENS INAND O_ME FOUR NICA
ANDRÉ PIMENTEL MOREIRA
Fortaleza/CE
1aEdition
2022
PREFACE
the aim was to present, in a clear and comprehensible manner, the concepts, fun-
I
1 Fundamentals of CNC 1
1.1 History of the CNC 1
1.1.1 History and perspectives . . . . . . . . . . . . . 10
1.2 Advantages and disadvantages . . . . . . . . . . . . . . . . 16
2Machining theory 20
2.1 Cutting parameters . . . . . . . . . . . . . . . . . . . 20
2.1.1 Cutting speed . . . . . . . . . . . . . . . 21
2.1.2 Advancement speed . . . . . . . . . . . . . . 23
2.1.3 Effective cutting speed . . . . . . . . . . . 24
2.1.4 Cutting depth . . . . . . . . . . . . . . 26
2.1.5 Machining force . . . . . . . . . . . . . . . 26
2.1.6 Machining power . . . . . . . . . . . . . . 36
I
3 Principle of CNC operation 38
3.1 Control grids . . . . . . . . . . . . . . . . . . . 38
3.1.1 Semi-closed circuit . . . . . . . . . . . . . . 43
3.1.2 Closed circuit . . . . . . . . . . . . . . . . 44
3.1.3 Hybrid circuit . . . . . . . . . . . . . . . . . 46
3.1.4 Open circuit . . . . . . . . . . . . . . . . . 47
3.2 Drive Motors . . . . . . . . . . . . . . . . 47
3.2.1 Direct current motors . . . . . . . . . . 48
3.2.2 Alternating Current Motors . . . . . . . . . . 57
3.2.3 Pulse Width Modulation - PWM . . . . . 67
3.3 Signal feedback devices . . . . . . . . 74
3.3.1 Teco-generators . . . . . . . . . . . . . . . . . 75
3.3.2Encoders78
3.3.3Resolvers89
4 Fastening devices 92
4.1 Fixation of parts . . . . . . . . . . . . . . . . . . . . 93
4.1.1 Self-centering plate . . . . . . . . . . . . . . . 93
4.1.2 Vises . . . . . . . . . . . . . . . . . . . . . 95
4.1.3 Clips . . . . . . . . . . . . . . . . . . . . 96
4.2 Tool fastening . . . . . . . . . . . . . . . . . 97
4.2.1Gang tools97
seven
4.2.2 Electric tower . . . . . . . . . . . . . . . . . . 98
4.2.3 Revolver Tower . . . . . . . . . . . . . . . . . . 99
4.2.4 Magazine 100
4.2.5 Mandrill . . . . . . . . . . . . . . . . . . . . . 101
4.2.6 Tool Support . . . . . . . . . . . . . . 102
eight
6.1.3 Zero point of the part . . . . . . . . . . . . . . . 131
6.2 Cartesian coordinate systems . . . . . . . . . . 132
6.2.1 Absolute and incremental coordinates . . . . . . 136
6.3 Program structure ......................................... 139
6.3.1 Special characters . . . . . . . . . . . . . . . 140
6.3.2 Positioning functions . . . . . . . . . . . 141
6.3.3 Special functions . . . . . . . . . . . . . . . . 141
6.4 Interpolation System . . . . . . . . . . . . . . . . . 143
6.4.1 Linear interpolation . . . . . . . . . . . . . . . 143
6.4.2 Circular interpolation . . . . . . . . . . . . . . 145
6.4.3 Polar coordinates . . . . . . . . . . . . . . 148
6.5 Programming language............................ 149
6.5.1 APT Language . . . . . . . . . . . . . . . . 150
6.5.2 EIA/ISO Language ..................................... 155
nine
8.1.1 Function G00 – Application: rapid movement
(approach and retreat) . . . . . . . . . . . . . 183
8.1.2 Function G01 – Application: linear interpolation
(linear machining or feed rate) . . . 183
8.1.3 Functions G02, G03 – Application: interpolation
circular . . . . . . . . . . . . . . . . . . . . . 185
8.1.4 Function C and R – Insertion of chamfer or corner
rounded . . . . . . . . . . . . . . . . . . 188
8.1.5 Function G4 – Application: length of stay .194
8.1.6 Function G15/G16 – Application: activates and deactivates
x
8.1.13 Function G52 – Local coordinate system – LCS215
8.1.14 Functions G53 – Machine coordinate system
quina - MCS . . . . . . . . . . . . . . . . . . 218
8.1.15 Functions G54 to G59 and G54.1 P1 to G54.1 P48 –
Working Coordinate System - WCS . . . 221
8.1.16 Functions G68 and G69 - Rotation of the coordinate system
ordered 223
xi
9.2.7 Function G74 R - Woodpecker drilling . . . . . . . 254
12
9.2.20 Function G86 – Boring – better finishes
Mento
9.2.21 Function G87 – Pull drilling . . . 293
9.2.22 Function G88 – Boring with manual return
9.2.23 Function G89 – Boring/broaching with
dwell
thirteen
11.3.2 Examples of application of Swansoft software
CNC Simulator . . . . . . . . . . . . . . . . . 330
14
Bibliographic References 403
15
Introduction
agriculture, the industrial revolution can be said to be the most significant for
seven
the manufacturing processes. It can be seen that even in the practice of agriculture,
with the Scotsman James Watt (designing the steam engine) in 1769,
also created the need to modernize the machinery industry
tools.
Today, machines with computer numerical control (CNC) are
used in various sizes and industrial segments, ranging from the
small machining shops to the grand manufacturing companies
Tura. In reality, there are almost no manufactured products that are not
somehow related to the technology of these machine tools
innovative.
Similarly, all workers involved in the environments
industries that operate CNCs must be able to understand
the technologies used in automated machining processes.
example, both product designers and operators on the floor
Factory workers must master mechanical drawing techniques and processes.
and machining tools. Just like the designers and operators, the
Those responsible for quality control must have extensive knowledge.
about metrology and dimensional tolerances. Furthermore, unlike what
occurs in conventional machines, maintenance professionals of
eight
CNC machines must have knowledge beyond the electromechanical systems.
cannons, to have knowledge in electronics and, in many cases, in systems
more computerized. In other words, it is evident that the professionals
they must have diverse knowledge to master this technology.
Currently, the use of CNC machines is an essential factor.
but for machining solution of parts with complex profiles. What
previously, high manufacturing times and great skill were required
machining workshop, manufacturing of jigs and special machines, with the
CNC technology or the process is carried out in a simple and reliable way.
speed.
According to Cassaniga (2000), Numerical Control (NC), and its defi-
simplest notion is that all geometric and dimensional information
elements contained in a part, known through drawings and dimensions
(numbers), would be understood and processed by the CNC machine, possi-
enabling the automation of the operation. In other words, the CNC is a piece of equipment
electronic that receives information in the way the machine will re-
to carry out an operation, through a specific language, called pro-
CNC grama processes this information and returns it to the system through
of electrical impulses. Electrical signals are responsible for the triggering
mentor of the engines that will give the machine the desired movements with
nine
programmed without the operator's intervention.
of the piece) and another the Z axis (the axis that determines the length of the piece),
the fixation of the piece is done by nuts fixed to a plate that comes
coupled to the central shaft of the machine which is called the axle shaft,
and we can also use the point that is fixed on a body that nor-
malmente is located on the Z axis bar in the position opposite to the plate and the
bracket that is placed between the plate and the point that is generally used for fixing
long parts.
x
According to Smid (2003), CNC milling machines also
called machining centers, are popular and efficient machines
mainly due to its flexibility. According to Smid (2003),
the main benefit that users obtain from a machining center
CNC is the ability to group various diverse operations into a single one.
configuration. For example, drilling, boring, countersinking,
screwing, facing, and contour milling can be incorporated
radii in a single CNC program operation. In addition, the flexibility-
Data is improved by automatic tool exchange using pallets.
to minimize idle time, indexing for a different face than
request, using a rotary motion of additional axes and several others
time-saving resources.
CNC machining centers can be equipped with software
special that controls speeds and cutting advancements, tool life
cutting tool, automatic measurement in process, detection of iron
broken mint, displacement adjustment and other optimization devices
production optimization and time savings.
In simple terms, the objective of a machine tool with
CNC is making the cutting or machining tools follow automatically
mathematically, a pre-programmed trajectory through coded instructions
fixed, with the speed of the trajectory and the rotation of the tool or piece
xi
also pre-programmed. There are several ways to execute this program
some manual, others assisted by computer like by
example the CAM -Computer Aided Manufacturingthe CAP -Com-
Computer Aided ProgrammingThere are also cases where the very
twelve
Chapter 1
Fundamentals of CNC
2
In 1952, the first 3-axis milling machine with control was developed.
numerical (CN) (Figure 1.1).
Figure 1.1: First CN machine developed in the MIT laboratory - 1952. Source:
Hemphill (2002).
The conventional controls and commands have been removed and replaced
Two by the numeric command, equipped with a punched tape reader,
data processing unit and servomechanism on the axes. After
during this period, the United States Air Force had a development
extraordinary, as they employ complex and highly precise components,
in the manufacture of aircraft, especially jet planes for use
military, began to be produced simply and quickly, reducing-
3
the delivery deadlines of the product from the design to the finishing
final. In Figure 1.2, a machined ashtray is presented in the first ma-
which CN (Figure 1.1) developed at MIT in 1952.
The first CN commercial machines
they were built in the 1950s
2
by John T. Parsons (Figure 1.3) and de-
running of the use of perforated tape (Figure
by the end of the 1950s, the CN was starting to catch on, but there was still
4
telegram and teletype as support for receiving and sending information
machine. The first punched tapes used in computers derived from
came directly from those used in the telegraph supporting the Baudot code
of 5 channels. This code only allowed the encoding of 32 states.
The coding of the digits was
achieved by the intervention of a ca-
special charactershift(uppercase passage-
circular), which indicated the beginning of a zone
to use the 7-bit ASCII code and, later, the 8-bit ASCII code
(ALMEIDA, 1999).
At the end of the 1970s, the original teletypewriters had been replaced
two by tape readers and punchers that allowed to reach speeds
very high. While a teletype reached reading speed of
order of 15 c/s (characters per second), there was a law in the 1970s
perforated tape readers that reached reading speeds on the order of
2,000 c/s (characters per second) (ALMEIDA, 1999).
The lack of standardization was felt quite strongly in companies that had
5
saw more than one control machine, manufactured by different
suppliers, each of them had their own language, with the need to
the necessity of a specialized technical team for each type of command,
what raised production costs.
In 1958, through the EIA
(Electronic Industries Association)
studies were organized in the sense of
6
Figure 1.5: Mechanism of reading punched tape. Source: Adapted from Howe (1955).
Each year, the application of the CN has been increased, mainly in the
aircraft industry. In 1956, the automatic iron exchanger emerged.
mints, later in 1958, the equipment with position control
point-to-point routing and the continuous generation of contours, which were
7
automatic tool changer.
Figure 1.6: CNC Milwaukee-Matic-II: first CNC machine with automatic tool changer
tool box - 1959. Source: Warfield (2010).
Currently, the most used means of data entry for the CNC is
by computer, although for many years the punched tape was the means
most used, as well as others with less prominence. The language dis-
the programming of machines was the APTAutomatically Progra-
medTools), developed by the Massachusetts Institute of Technology
in 1956, from then on, other languages were developed for
the continuous generation of outlines like AutoPrompt (Automatic Pro-
Programming of Machine Tools), ADAPT, Compact II, Action, and others
that emerged and continue to emerge for new applications.
With the advent of the integrated circuit, there was a significant reduction
8
in the physical size of commands, although their storage capacity
the increase has been noted when compared to the transistor controls
Curly. In 1967, the first controlled machines appeared in Brazil.
numerically, coming from the United States.
In the early 1970s, the first CNC machines emerged.
(Computer Numerical Control), and in Brazil are produced the
first national manufacturing CNC machines in Romi industry
entrepreneur Américo Emílio Romi4 , seen in Figure 1.7.
From there, an evolution is observed
notable and continuous solution concomitant
increasing confidence throughout the system. In Figure 1.8, the pri- is seen
4
He was a Brazilian industrialist, born in São José do Rio Pardo, SP, on June 26.
born in 1896, son of Policarpo Romi and Regina Seppia Romi. He was the founder of the Industries
Romi S.A., which became the largest manufacturer of machine tools and machines.
for plastic processing in Brazil. Indústrias Romi S.A. also produced
the first Brazilian tractor, the Toro, and the first passenger car manufactured in Brazil, the
Romi-Isetta.
9
my lathe equipped with CN from Brazil.
According to Cassaniga (2000), the command CN is the one that exe-
cut a program without memorizing it, and with each execution, the command must
Figure 1.8: DCE 480 CN - First lathe equipped with CN in Brazil - Industries
Romi - 1973. Source: Romi (2014).
same time.
10
Today it is common to find CNC machines operating in con-
together with complementary computing systems, which in other pa-
Lavas are adaptable software that assist in manufacturing processes.
in CNC machines that can interact in two ways - project au-
computer-aided design (CAD) and computer-aided manufacturing
(CAM). That is, CAD and CAM software enable design and im-
complement the plan behind a computer screen.
Software control means faster configuration and changes
easier options in design, even at the last minute. The entry of
external softwarethe controller system revolutionized the machines
CNC and brought them to today's industry standards, which have as characteristic-
11
we will manufacture machines equipped with CNC;
12
video in Brazil by MCS for transfer machines5 ;
1987It is launched at the first International Machine Fair.
Tools and Integrated Manufacturing Systems (FEIMAFE) CNC
210 of MCS, equipping the Romi Centur30 lathes and the GPR Nardini,
with 100% national technology.
Figure 1.9 shows the automobile repair workshop founded
by Américo Emílio Romi, which marks the beginning of Indústrias Romi S.A.
Figure 1.9: Santa Bárbara Office - 1930 (Indústrias Romi S.A). Source: Romi (2014).
13
plasma, plastic and/or aluminum injectors etc. These will have to attend
the requirements: connectivity, flexibility, speed, synchronization
and intelligence.
According to Couto (2019), traditionally CNC machines,
although the second 'C' meant computerized, it always remained at
margin of direct administration or other modules of theEnterprise
Resource Planning(ERP)6 . It has never been required of these machines a
system connected with feedback of information that could be approved
veitated, as knowledge, for a production management in
real-time, they have always had a bit of intelligence. In terms
practical, the possibility of connecting with the company's ERP system
becomes a mandatory foundation in the view of Industry 4.0.
The machines equipped with CNC will undergo, with integration and co-
connection, to report the activities in real time, what is its efficiency, di-
14
posted next to the machine, besides, of course, the monitoring of the des-
of the processing time and it will be absolute and repetitive, very imposing-
production density, in an integrated manner with other resources and power infor-
a new alternative sequencing and informs when the item that does not
It was complete to be produced, it should enter the sequence again.
about the shift, or if overtime will be needed on the resource and how much this may cost
15
increasingly greater with the user, new functionalities also emerge
ram to facilitate operation and provide a human experience
machine more and more friendly.
a. increase in flexibility;
16
e. possibility of using peripheral computing equipment;
i. repeatability;
Operational security.
17
e. it does not have such evident advantages for small and very small series
nas;
Romi Discovery 308, equipped with the Mach 8 control (Fig. 1.10(c))
and the Romi Centur 30 R turning centers, previously equipped
with the Mach 5 command, replaced by the MCS command throughre-
trotting(Fig. 1.10(d)), the Romi Centur 30, equipped with the command
Mach 9 (Fig. 1.10(e)) and the Nardini Diplomat Vulcanic Golg 160, equal-
I am using the Fanuc Oi command (Fig. 1.10(f)).
18
Nardini Machining Center Romi Dis Machining Center
Skybull 600 - IFCE. Source: Author. covery 1000 - IFCE. Source: Author.
Figure 1.10: Examples of machining centers and lathes equipped with CNC.
19
Bibliographic References
21
ANGELELI, J. et al. Computerized Numerical Control. Campinas
Brazil: SENAI School - Roberto Mange, 2012.
22
2019. Available at: <[Link]
pt-br/composition/specific-bodies/secretariat-of-labor/inspection/
safety-and-health-at-work/regulatory-standards/[Link]
23
CENFIM. Basic Turning Operations. Lisbon, Portugal: Center
of Professional Training in the Metallurgical and Metalworking Industry,
2021. Available at: <[Link]
mod_resource/content/0/UP0051_BASIC_OPERATIONS_OF
_TORNEAMENTO.pdf>.
24
The provided text is a URL and cannot be translated.
Accessed on April 9, 2022.
CIMM. Cast Iron Alloys. Florianópolis/SC: Portal of the Center for Information
Metal Mechanics - Machining on Line Ltda, Department of
Mechanical Engineering of UFSC - Federal University of Santa Catarina
rina., 2022. Available at: <[Link]
didactic/4809-fused-links>. Accessed on April 10, 2022.
25
CONTI, F. History of the computer and the Internet. Available at:
[Link] Accessed on May 02
2014: Federal University of Pará, 2014.
COUTO, S. Z. How should CNC machines be in Industry 4.0?
Ind4.0, São Paulo, September 2019.
CUNHA, L. Radiography – Electric motors: moving the world. 43.
ed. São Paulo, SP: The Electric Sector, 2009.
CURTIS, R. D. Dr. Howard Tracy Hall. Utah County, Utah, USA:
Find a Grave, 2022. Accessed on May 16, 2022. Available at:
<[Link]
[Link] Toolroom Lathes Machines. Taichung, Taiwan.
Available at: <[Link]
[Link]> Access May 04, 2021.: Cyclematic Machinery,
2021.
Machining of Hard Materials
ISBN 9781849964500. Available at: <[Link]
books?id=_BE2O1AvYq8C>.
DINIZ, [Link] Machines, Constructive Aspects, Operation and
Application. São Paulo: SOBRACO Bulletin (Brazilian Society of
Numeric Command, No 48, 1990.
DINIZ, A. E.; MARCONDES, F. C.; LEMOS, N. Technology of
Machining of materials. 9th ed. [S.l.]: Artliber Editora Ltda, 2014.
DINIZ, A. O. The study of the internal threading process of iron
gray casting using different indexing systems for males
of the court. Uberlândia/MG: Dissertation (master's degree) - University
Federal University of Uberlândia, Graduate Program in Engineering
Mechanics, 2018.
26
DIRECT-INDUSTRY. Heavy-duty absolute rotary encoder. Sansab
Minburee Bangkok: Direct Industry, 2014. Accessed on: May 13
2014. Available at: <[Link]
[Link]>
27
FERES, F. 80 years of contributions to industrial evolution.
World of Digital Machining, 2014. Accessed June 26, 2014. Available
em: <[Link]
172>.
28
GOMES, S. Three-phase induction motor with wound rotor.
Araraquara-SP: Electric Machines Blogspot, 2013. Accessed on: 07
May 2014. Available at: <[Link]
br/2013/04/[Link].
29
[Link] DCMT11T302D (PCD). Iscar Ltda. Manufacturer of
Metalworking Tools, 2022. Available at: <[Link]
ecatalog/Ecat/datafile/PICTURE/[Link]>.
30
LYNCH, M.G28 Versus G53 - Which command is better to get
your machine axes to the reference position? Available at:
Accessed on:
May 18, 2021.: Modern Machine Shop, 2013.
31
[Link]/contents/mht/pt/html/product/technical
information/information/turning_effects.html
32
Oliveira Júnior, M. A. de; SILVA, S. D. da. Programming and
machining center operation. 1st ed. SENAI-SP Publishing, 2018.
233 p. Available at: <[Link]
programming-and-operation-of-machining-center>.
33
About the author
He was an instructor in the metalworking and mechatronics area of
National Service for Industrial Learning of Ceará
(SENAI-CE) and is currently a faculty member of the Department of
Industry of the Federal Institute of Education, Science and
Ceará Technology (IFCE), Fortaleza Campus. It has
PhD in Mechatronics from the Polytechnic School of
Federal University of Bahia. The main interests are
in the field of Industrial Automation, with an emphasis on
programmable logical controllers, supervisory systems,
instrumentation and process control, drive systems
hydraulics and pneumatics and industrial robotics. In the area of
industrial mechanics, with a focus on manufacturing processes
conventional and computer numerical controlled.