CNC Report DJJ 5032
CNC Report DJJ 5032
CNC Report DJJ 5032
0 Introduction
Computer numerical control is a modern concept in the manufacturing and production industries.
However, the concept of CNC harkens back to the basic idea of NC, or numerical control. The
idea of numerical control started when the automation of machine tools originally incorporated
specific concepts of programmable logic. In the beginning, the first NC machines were built back
in the 1940s. Slightly more advanced machines came along in the 1950s. These manufacturing
machines were constructed based on existing tools that were modified with motors designed to
move the controls of the machine. These controls followed specific points that were fed into the
machine on punched tape. These early mechanisms were soon improved with both analog and
digital computers. The introduction of computer technology into the concept of numerical
control led to what we now know as computer numerical control.
After World War II, John Parsons researched ways to improve aircraft by creating stiffened skins
for them. This eventually led to a series of important Air Force research projects, which were
conducted at the Massachusetts Institute of Technology (MIT). This research began in 1949.
After the early planning and research phases, an experimental milling machine was designed at
MIT. Professor J.F. Reintjes and his team of researchers were involved in this project.
Before the MIT projects, Parsons Corporation in Traverse City, Michigan developed a system to
produce templates for helicopter blades. John Parsons, who founded the company, discovered
how to calculate airfoil coordinates on an IBM 602A multiplier. He then fed these data points
into a Swiss jig borer. To date, this was considered the first true numerical control machine as it
manufactured goods – helicopter blade templates, in this case – by feeding punched cards into a
system, and the system then read and produced the parts based on preprogrammed information.
As numerical control technology moved into the 1960s and 1970s, a very familiar form of a
CNC machine that most would recognize today started taking shape. Digital technology then
entered the fray, and automation in production processes became more efficient than ever. In
fact, many individuals can purchase – and even design – their own homemade CNC machines.
Because of how advanced computers are nowadays, it’s more common than ever to find CNC
machines in all industries.
1
1.1.4 Staples of CNC Technology
While there has been tremendous change in the history of CNC technology, there are a few
cornerstones that have remained unchanged. All automated motion control manufacturing
machines,, from bare-bones concepts of the early days to highly advanced systems today, still
require 3 primary components. These include a command function, a drive/motion system, and a
feedback system.
CNC has had a long and interesting history. As technology evolves in the future, there may be
even more incredible elements to add to its history as manufacturing continues to promote the
use of robotic and automated processes in nearly every field.
2
1.1.5 Component of traditional NC systems
3
1.2.2 Components of modern CNC systems
CNC machines can be used continuously and only need to be switched off for
occasional maintenance.
These machines require less skilled people to operate unlike manual lathes/milling
machines etc.
CNC machines can be updated by improving the software used to drive the machines.
Training for the use of CNC machines can be done through the use of “virtual software”.
The manufacturing process can be simulated virtually and no need to make a prototype or
a model. This saves time and money.
Once programmed, these machines can be left and do not require any human
intervention, except for work loading and unloading.
These machines can manufacture several components to the required accuracy without
any fatigue as in the case of manually operated machines.
Savings in time that could be achieved with the CNC machines are quite significant.
4
1.2.4 Disadvantages of CNC systems
CNC machines are generally more expensive than manually operated machines.
The CNC machine operator only needs basic training and skills, enough to supervise
several machines.
Increase in electrical maintenance, high initial investment and high per hour operating
costs than the traditional systems.
Fewer workers are required to operate CNC machines compared to manually operated
machines. Investment in CNC machines can lead to unemployment.
5
1.3 Direct Numerical Control (DNC)
In a Direct Numerical Control system (DNC), a mainframe computer is used to coordinate the
simultaneous operations of a number NC machines. The main tasks performed by the computer
are to program and edit part programs as well as download part programs to NC machines.
Machine tool controllers have limited memory and a part program may contain few thousands of
blocks. So the program is stored in a separate computer and sent directly to the machine, one
block at a time.
6
1.4 Distributed Numerical Control (DNC)
Distributed NC is known by the same acronym as Direct Numerical Control (DNC). After the
introduction of CNC, the machine tools have had the capability of storing large amount of
information. Therefore, there have been no need to have drip feed information system, like,
Direct Numerical Control. Instead, Distributed Numerical Control is introduced. In such a
system, a host computer communicate with many CNC machine tools via networks and
download or upload programs.With Distributed Numerical Control systems, it is possible to
monitor the activities in individual CNC machine tools on host computer. Therefore, better shop
floor control can be achieved.
7
1.5 Application of CNC Machine Tools
8
Contouring Systems (Continuous Path Systems)
It is used in CNC machine tools such as milling machines.
These machines require simultaneous control of axes.
Contouring machines can also be used as point-to-point machines, but it will be
uneconomical to use them unless the work piece also requires having a contouring
operation to be performed on it.
9
2.0. List of G code & M code
10
2.2 Glossary
11
2.3 Format
In writing G Code programs there are some rules to be aware of as well as some general formatting
guidelines that should be followed or at least considered.
The first part of any program should be a safe start up block. This line of code is used to make sure that
some modes are disabled and others are set to their most common setting. An example safe start block
would look like this:
This block of code tells the machine that we want to be in rapid mode and using absolute position in the
XY plane of fixture offset 1. At the same time we want to cancel any tool diameter and length offsets
and make sure any active canned cycles are cancelled.
It is recommended that this safe start block be used at the start of the program and also before or
immediately following every tool change. It is common to restart a program from a tool change, having
the safe start line there can greatly reduce the chance of a machine not acting as expected, the results
of which can be aggravating at best and a crash at worst. The safe start block shown here is just an
example. Every machine and every programmer are a little different and each will have their own start
up block.
Jumping to the end of the program there is not a lot required. Typically there will be a couple blocks of
code to return the Z axis to the home position and maybe move the work piece closer to the operator
for easier loading and unloading of parts. Shutting off the spindle and coolant or any other accessories is
also a good idea here. The final block in a program is a program end code, most commonly M30 but
there are other options. Make sure this final block is followed by an end of block. It is easy to forget this
last EOB in a program for Mach because it is just a carriage return and not always readily apparent. One
way to make sure that there is always an EOB on your program end block is to follow it with %. Like this:
M30 %
This percent sign is a familiar symbol to CNC programmers in industry; however any symbol or character
can be used as it will not be read by the control because of the program end before it. If there is no EOB
following the percent sign it will not show up in the program when loaded into Mach.
In between the start and end is the body of the program. There are a few rules here. Each block of code
will contain a combination of words. Multiple G codes can be specified in a single block, however if more
than one from the same modal group is specified the last one in the block will be valid, with the
12
exception of group 00. Modal G codes stay active until another from the same group is called. For
example; G01 is modal so it is not necessary to put it in consecutive blocks. Once active every successive
positioning block will be in the G1 mode unless another code from group one is called (G00, G02, G03,
etc.). All G codes not in group 0 behave this way.
Only one M code can be specified in a single block. Same holds true for all other words.
Generally leading zeroes are not required in G Code. For example G01 and G1 are the same. The same
holds true for M codes, position commands, feed rates, etc. When specifying values for position, feed
rate, variables, etc., it is good practice to always use a decimal point and trailing zero, instead of X1 use
X1.0. Although the decimal point is not required (in Mach X1 = X1.0) it is HIGHLY recommended.
13
2.4 G code list
14
15
2.5 M code list
16
17
3.0 Project Drawing
18
4.0 Part Program
4.1 Project Drawing Part Program
02000.txt
N10 G90 G80 G40 G49
N20 G91 G28 Z00
N30 G00 G90 G54
N40 G43 H01
N50 S4500 M03 M08
N60 G00 X15 Y-12.5
N70 G00 Z100.
N80 G00 Z-10.
N90 G01 G42
N100 G01 X15 Y15
N110 G01 X15 Y95.96
N120 G01 X39.37 Y125
N130 G01 X75 Y125
N140 G01 X75 Y90
N150 G03 X105 Y90 R15
N160 G01 X105 Y125
N170 G01 X140 Y125
N180 G01 X140 Y40
N190 G02 X115 Y15 R25
N200 G01 X-12.5 Y15
N210 G00 Z50
N220 M9
N230 M5
N240 G91 G28 Z0
N250 M30
19
4.2 Part Program with Description
20
N150 Counter clockwise arc feed move with a
radius of 15 to x-axis position 105 and y-
axis position 90
N160 Liner feed move
Spindle position of x-axis is 105
Spindle position of y-axis is 125
N170 Liner feed move
Spindle position of x-axis is 140
Spindle position of y-axis is 125
N180 Liner feed move
Spindle position of x-axis is 140
Spindle position of y-axis is 40
N190 Clockwise arc feed move with radius of 25
towards position x-axis:115 and y-axis:15
N200 Liner feed move
Spindle position of x-axis is -12.5
Spindle position of y-axis is 15
N210 Spindle rapid move
Spindle position of z-axis is 50
N220 All coolant off
N230 Spindle stop
N240 Incremental position mode
Zero return
Spindle position of z-axis is 0
N250 Program end
21
4.3. Cutting Parameter
Cutting parameters are set of questions asked by a CAM system to perform a task. For
instance,the system ask the CAM operators to define the parameters such a spindle speed or the
cutting feed or the strategies to engage the tool in the material.In order to carry out a successful
metal fabrication by using a CAM system ,the operator should be skillful and knowledgeable
enough to obtain the parameters by performing several calculation based on tool and material
that used for fabrication.
Cutting speed(Vc) varies based on types of tools used for cutting purpose and material that used
for metal fabrication . Below is the cutting speed chart for High Speed Steel and Carbide Cutting
tool .Take note, cutting speed also differs based on manufacturers.Thus ,a cnc operator should
refer to table provided by tool manufacturer itself.
22
Below is the example of cutting speed chart provided by Mitsubishi Material U.S.A Corporation
for Carbide tools.
23
4.3.2 Feed Rate
Feed per Tooth (fz) varies based on types of tools used for cutting purpose and material that
used for metal fabrication . Below is the Feed per Tooth(fz) value for Carbide Cutting tool
obtain from Mitsubishi Material U.S.A Corporation.
Cutting speed also differs based on manufacturers.Thus, a cnc operator should refer to the table
provided by the tool manufacturer itself.
Fig 10: Feed per Tooth(fz) Chart for Carbide Cutting Tool
24
5.0 Work Procedure
5.1 Part Program
A part program is a set of instructions given to a computerized numerical control (CNC)
machine to control its operation.Part of a program is the most important aspect in Computer
Numerical Control .By looking at a drawing, a programmer or operator of cnc machine able to
think about all the sequential operation, specify raw material size,tool definition,tool call,specify
the tool position ,specify the Z0 position,specify the depth of cut ,specify the coordinate for
cutting operation and retract the tool safely at the end of cut. Below is example of part program .
02000.txt
G90 G80 G40 G49
G91 G28 Z00
G00 G90 G54
G43 H01
S4500 M03 M08
G00 X15 Y-12.5
G00 Z100.
G00 Z-10.
G01 G42
G01 X15 Y15
G01 X15 Y95.96
G01 X39.37 Y125
G01 X75 Y125
G01 X75 Y90
G03 X105 Y90 R15
G01 X105 Y125
G01 X140 Y125
G01 X140 Y40
G02 X115 Y15 R25
G01 X-12.5 Y15
G00 Z50
M9
M5
G91 G28 Z0
M30
25
5.2 Check Simulation
After part program has been written by a cnc programmer .In order to check whether that part
program has any error or not , usually a CNC simulation software will be used, to avoid mistake
or difficulties.The CNC simulation software has been developed for simulation of all parts and
operations of a CNC machine. The user inputs the NC codes, workpiece geometry, tool, tool
holders and other machine parameters into computer program, then starts simulation. The
simulation software shows all the machine motions. All possible machining errors can be seen
during simulation. These errors are; interference of machine parts, workpiece and invalid NC
codes. After simulation, the user can visualise the cut workpiece and check it for the desired
dimensions. To achieve good simulation and verification properties, several material removal
and error checking algorithms have been developed throughout the software development
process.Below are examples of simulation softwares.
26
5.3 Machine Data Input/Data Transfer
After a part program is successfully written and tested in simulation software is has to be
transferred to CNC machine in order to manufacture or fabricated following merchandise.The
machining program can input/output between the NC internal memory and the external
input/output device. The hard disk inside the NC unit is also treated as an external device. . There
are several ways to input data into a cnc machine.As example:
(1) Memory (NC internal memory)
(2) HD
(3) Serial
(4) Memory card (front IC card)
(5) DS (compact flash at NC)
(6) Ethernet
(7) FD
(8) Anshin-net server
(9)MDI(Manual Data Input)
27
5.4 Test Run and Check
5.4.1 Test Run
Following data transfer to CNC machine , operator can also do a test run to avoid and ensure
there is no errors when fabricating a real merchandise .A test run can be done on a Acrylic block
before fabricating a metal block
28
Fig 14: Example of Program Check In Mitsubishi M70
29
Fig 15:Handwheel Mode
Fig 16:Handwheel
Operator also have to ensure that cnc table able to zero return on command by turning the
knob to zero return mode and press the zero return key.
30
5.5.2 Manual Program
5.5.2.1 Manual Program Edit
To edit machining programs manually .First of all, turn the knob pointing MDI mode, then press
the monitor softkey followed by edit .When the main menu Edit is pressed, the operation
searched program (MDI program for MDI mode) appears. If no program has been searched or
tape operation has been executed, the edit window will not open.When the program is edited, the
key input data is directly written into the program display area. All data is overwritten from the
cursor position. "Editing" appears on the right side of the file name display when the input starts.
When the INPUT key is pressed, the program is saved in the NC memory and the
"Editing"message disappears.
31
5.5.2.2 Creating New Machining Program Manually
32
5.5.2.3 Editing a Machining Program Manually
33
5.5.2.4 Registering MDI Program in NC Memory
34
5.5.3 Setting Up Tool Compensation Data
5.5.3.1 Tool Compensation Amount
The tool compensation data can be set and displayed.The tool compensation data screen
configuration differs according to the tool compensation type.The number of tool compensation
sets to be set or shown differs according to the option.Inputting an address key, such as MST,
displays manual numerical value command window where manual numerical value command is
executed.
35
The shape compensation amount and wear compensation amount are set separately. The shape
compensation amount is furthermore divided into length and radius dimensions.
Of the compensation data, the length dimension data is used for the tool length compensation and
tool position offset, and the radius dimension data is used for the tool radius compensation and
three-dimensional tool radius compensation.
36
Tool compensation data can be set by turning the knob to memory, follow by setup and
wear data or length data or nose data .Below is operation method setting up tool
compensation data.
37
5.5.3.3 Copying/Pasting the Tool Compensation Data
38
5.5.3.4 Tool Compensation Amount (L system)
Wear Data Set the tool nose wear amount for each tool used. When the tool compensation No.
is designated by thetool command (T command), compensation is carried out matching the tool
length data and tool nose
data.
39
5.5.4 Searching File (Part Program)
A specific NC file can be searched by turning knob to memory mode and followed by monitor
and search softkey.There will be bunch of programmed saved and the choose the file name that
want to run.
40
5.5.5 Tool Registration
A tool No. is assigned to each tool to make the tools installed on the machine recognizable to the
NC. The tool No. is registered corresponding to the magazine pot and spindle where that tool is
installed, and the standby location. When the tool No. and magazine pot are changed by a tool
selection command or tool replacement command, the new tool No. is displayed When not
making an arbitrary setting for the number of registered tools, there are maximum 3 magazines,
and up to 120 tools can be registered for each magazines. When making an arbitrary setting,
there are a maximum of 5 magazines, and up to 360 tools can be registered for all magazines.
This function differs depending on the specifications of the machine tool builder. Refer to the
instruction manual issued by the machine tool builder for details.
41
5.5.5.1 Registering a Tool in the Magazine Pot
42
5.5.6.0 Origin Set, Origin Cancel
Origin set can be done by turning the knob to memory followed by monitor and counter set
softkey
Origin set and origin cancel can be executed.
Origin set and origin cancel cannot be executed for an axis of auxiliary axis state.
43
44
6.0 Conclusion
After 2 ½ weeks of practical classes we have learned a lot about Computer Numerical
Control(CNC) machine .We also has learned how to part program by using ‘G’ and ‘M’ code as
well. Other than, we also has learn how to operate a CNC machine with the help of lecturer and
at the same time understood the uses and function of CNC machine in industry.Spirit of
cooperation also has been cultivated between members of each group and we also learned
proper safety measures during practice ..
1. We can understand how the use of CNC Milling machine at work project.
2. We can complete the project according to project design and project dimensions.
3. Made to achieve the project objectives and in accordance with our requirements.
4. Understand what has been taught in theory and in practice can be machined.
5. We can solve the problems during the project coordinate system before we make a simulation.
6. We can understand how to enter data (key-in) program at CNC machine control panel.
45
7.0 References
“Numerical Control”
(No Author)
https://en.wikipedia.org/wiki/Numerical_control
Viewed(28 July 2018)
46