You are on page 1of 15

Republic of the Philippines

BOHOL ISLAND STATE UNIVERSITY


MAIN CAMPUS
COLLEGE OF ENGINEERING AND ARCHITECTURE

VISION: A premier Science and Technology university for the formation of a world-class and virtuous human resource for sustainable development in Bohol and the country
MISSION: Committed to provide quality higher education in the arts and sciences, as well as in professional and technological fields; undertake research and development
and extension services for sustainable development of Bohol and the country.
GOALS: 1. Pursue faculty and education excellence and strengthen the current viable curricular programs and develop curricular programs that are responsive to the demands
of the times both in the industry and the environment.
2. Promote quality research outputs that respond to the needs of the local and national communities.
3. Develop communities through responsive extension programs.
4. Adopt efficient and profitable income generating projects/enterprise for self-sustainability.
5. Provide adequate, state-of-the-art and accessible infrastructure support facilities for quality equation.
6. Promote efficient and effective good governance supportive of high quality education.

ME ELEVTIVE 2 – COMPUTER NUMERICAL CONTROL (CNC)


CNC Basics and Machine Operation
LM 1
CNC Basics

Computer Numerical Control = Control of a system or device by direct input of data in the form of
numbers, letters, symbols, words, or a combination of these forms. It is a principal element of computer-
integrated manufacturing, particularly for controlling the operation of machine tools. Computer converts the
design produced by Computer Aided Design software (CAD), into numbers. The numbers can be considered to
be the coordinates of a graph and they control the movement of the cutter. ... A simple plastic block such as this
may have a thousand coordinates.

WHAT IS CNC PROGRAMMING?


CNC programming is a method of defining machine tool movements through the application of numbers
and corresponding coded letter symbols. As shown in the list below, all phases of production are considered in
programming, beginning with the engineering drawing or blueprint and ending with the final product:
• Engineering drawing or blueprint
• Work holding considerations
• Tool selection
• Preparation of the part program
• Part program tool path verification
• Measuring of tool and work offsets
• Program test by dry run
• Automatic operation or CNC machining

COORDINATE SYSTEMS
All machines are equipped with the basic traveling components, which move in relation to one another
as well as in perpendicular directions.
A two-dimensional coordinate system, such as the one used on a lathe, uses the X and Z axes for
measurement. The X-axis runs perpendicular to the workpiece and the Z-axis is parallel with the spindle
centerline.

Three-dimensional coordinate system uses by mill, the same concept can be used with rectangular
workpieces. In three-dimensional rectangular workpiece, the origin or zero-point must be defined differently.

Page 1 of 15
The thickness of the part is the third dimension or Z-axis. When selecting a zero-point for the Z-axis of a
particular part, it is common to use the top surface.

Page 2 of 15
POINTS OF REFERENCE

When using CNC machines, any tool location is controlled within the coordinate system. The accuracy
of this positional information is established by specifi c zero points (reference points).
The first is Machine Zero, a fixed point established by the manufacturer that is the basis for all
coordinate system measurements. Machine Zero Point establishes the coordinate system for operation of the
machine and is commonly called Machine Home (Home position).
The second zero point can be located anywhere within the machine work envelope and is called
Workpiece Zero; it is used as the basis for programmed coordinate values used to produce the workpiece.

CNC Machine Operation

Page 3 of 15
PROGRAM SOURCE

Page 4 of 15
Auto
Pressing this button enables the CNC programs stored in the memory to be executed for automatic
operation. When the Cycle Start button is pressed and this mode is active, automatic operation will occur.
Edit
Pressing this button selects the program edit mode. The EDIT mode enables you to enter the part
program to control memory via keypad and soft-keys, enter any changes to the program, transfer program data
via one of several communication interfaces (RS232, USB, Memory Card, or Ethernet) to or from an offl ine
storage device, or check the program fi le memory, fi le locations, and storage capacity.
MDI-Manual Data Input
Pressing the MDI button selects the MANUAL DATA INPUT mode. The MDI mode enables the
automatic control of the machine, using information entered in the form of program blocks without interfering
with the basic part program. This mode is often used when machining workpiece-holding equipment such as
soft-jaws and during setup. It corresponds to single moves (milling surfaces, drilling holes), descriptions of
which need not be entered to memory storage.
Remote
The Remote button is used for DNC (Direct Numerical Control) program operations when the program
is too large for the controller memory and is executed (drip-fed) directly from a remote personal computer (PC)
via Ethernet or memory card. USB cannot be used for DNC operations.

OPERATION SELECT
The following buttons are related to the automatic operation of the machine. Activating one of these
buttons has an effect on the operation.

Single Block
The execution of a SINGLE BLOCK (SINGL BLOCK) of information is initiated by pressing this
button to turn it ON. Each time the CYCLE START button is pressed, only one block of information will be
executed. This switch can also be used if you intend to check the initial performance of a new program on the
machine or when the momentary interruption of a machine’s work is necessary.
Block Skip
When this button is pressed and is active simultaneously with the auto-cycle mode, the controller skips
execution of the program blocks that are preceded by the slash ( / ) symbol and that end with the end of block (;)
character. For instance, if a section of the part program or a particular block of the program is not presently
needed—but you would like to keep this information for future use—then place the block skip symbol ( / ) at the
beginning of each such block. The BLOCK SKIP button is located on the control panel. If it is activated, then
information contained in the blocks that are preceded by the symbol (/ ) will not be executed.
Example:
N100 G01 X2.810 Y3.256
/N105 X3.253 Y2.864
/N110 X3.800
(Blocks N105 and N110 will be skipped.)
Opt Stop
When this button is pressed, the OPTIONAL STOP mode is active. The OPTIONAL STOP function
interrupts the automatic cycle of the machine if the program word M01 appears in the program. Quite often,
function M01 is placed in the program after the work of a particular tool is completed or before a tool change.
This enables you to perform chip removal or a routine measurement directly on the machine and, if necessary,
make adjustments, and then rerun the same tool to correct inaccuracies.
Teach

Page 5 of 15
If the TEACH button is available, you can use it to create/edit a program, positioning the axes manually
by jogging (Teach-in Jog) or handle (Teach-in Handle) mode, and inputting the other required codes while in the
MDI or Edit mode. When the Teach mode is used, the movements of the axes are recorded while in either Jog or
Handle mode. Machine positions along the X-, Y-, and Z-axes obtained by this manual operation are stored in
memory as a program position; they are used to create a program. These movements can then be executed just as
with any program. Consult the manufacturer’s operator manual for detailed descriptions on the TEACH button’s
proper use. Not all controls have this feature.
Restart
The RESTART button allows you to restart automatic operation at a specific place in the program by
entering a desired line sequence number. This sometimes becomes necessary after tool breakage or some type of
collision. When the proper data are entered, the control processes through the program until the block entered is
reached; it then activates any required modal G, F, D, and H commands. Any needed auxiliary codes (M, S, T,
and B) must be entered during the Restart process.
MC Lock
This function is known as MACHINE LOCK. Activating this mode inhibits axis movement on all of the
axes. This button is used to check a new program on the machine through the controller. All movements of the
tool are locked, while a program check is run on the computer and displayed on the screen.
Dry Run
When you press the DRY RUN button during automatic cycle, all of the rapid and work feeds are
changed to a feed set in the parameters instead of the programmed feed (usually rapid traverse feed rate). In this
mode, you can control the feed rate by using the Feed Override switch. Consult the manufacturer manual for
specific directions on the use of this function. Also used to check a new program on the machine without any
work actually being performed by the tool.

EXECUTION
These three buttons are related to automatic operation of the machine.
Cycle Stop (Feed Hold)
Pressing the CYCLE STOP button during automatic operation will halt all feed movements of the
machine.
Cycle Start
The CYCLE START button is used to start automatic operation. Use this button in order to begin the
execution of a program from memory.

PRG STOP (Program Stop)


When a Program Stop is commanded in the program by the program word M00, automatic operation is
stopped and the LED on this button is turned on.

OPERATION
The keys in the Operation section (middle column) are used for manual operation of the machine during
setup and initial startup.
REF (Reference)
Press the REF button to activate it. Then, pressing the X or Z buttons in the positive direction (X, Y or Z
for machining centers) causes the machine to return to the Machine Zero position for each axis in relation to the
machine coordinate system at the rapid traverse rate (maximum feedrate).
Jog
Pressing the JOG button activates a manual feed mode that allows the selection of manual feed
movements along single axes X or Z (X, Y, or Z for machining centers). With the button activated, use the
Axis/Direction (+ or –) buttons and the Feed Override dial to move the desired axis at the chosen feed rate.
INC (Incremental)
Press the INC (Incremental JOG) button to activate the JOG mode in incremental steps. When one of the
axes directional buttons is pressed and released, the movement will be as follows:
X1 = a movement of .0001 inch or .0025 millimeters (mm)
X10 = a movement of .001 inch or .0254 mm
X100 = a movement of .010 inch or .254 mm
X1000 = a movement of .100 inch or 2.54 mm

Page 6 of 15
Handle
Pressing the HANDLE button activates the manual handle feed mode for the selected axis. This handle
is known as the Manual Pulse Generator (MPG).
SPINDLE
The spindle buttons are used exclusively during the machine’s manual operation for setup functions.
SPDL CW
By pressing the SPDL CW button while in one of the operation modes REF, JOG, INC, or HANDLE,
the spindle will start rotation in the clockwise (CW) direction.
SPDL STOP
Pressing the SPDL STOP button stops spindle motor rotation while in one of the operation modes listed
above.
SPDL CCW
Pressing the SPDL CCW button is exactly the same as pressing the SPDL CW except that the spindle
will start rotation in the counterclockwise (CCW) direction.

PROGRAM FORMAT
The language described in this book is used for controlling machine tools and is known informally as
“G-Code”.

Page 7 of 15
G – CODES & M – CODES

A G (geometric) code in CNC programming controls the movements of a machine, dictating how and
where a machine should move to fabricate a part. G-codes is for the product design and activates the
Numerical Control Machine.
M codes: An M code in CNC programming controls miscellaneous machine functions,
including starting and stopping specific actions or programs. M codes are related to the machine
functions and activates the PLC of the machine.

G – Codes for Turning (Lathe)


CODE CATEGORY FUNCTION NOTES
G00 Motion Move in a straight line at rapids speed. XYZ of endpoint
G01 Motion Move in a straight line at last speed XYZ of endpoint
commanded by a (F)eedrate
G02 Motion Clockwise circular arc at (F)eedrate XYZ of endpoint;
IJK relative to center;
R for radius
G03 Motion Counter-clockwise circular arc at (F)eedrate XYZ of endpoint;
IJK relative to center;
R for radius
G04 MOTION Dwell: Stop for a specified time. P for milliseconds;
X for seconds
G09 Motion Exact stop check
G10 Compensation Programmable parameter input
G17 Coordinate Select X-Y plane
G18 Coordinate Select X-Z plane
G19 Coordinate Select Y-Z plane
G20 Coordinate Program coordinates are inches
G21 Coordinate Program coordinates are mm
G27 Motion Reference point return check
G28 Motion Return to home position
G29 Motion Return from the reference position
G30 Motion Return to the 2nd, 3rd, and 4th reference
point
G32 Canned Constant lead threading (like G01
synchronized with spindle)
G40 Compensation Tool cutter compensation off (radius comp.)
G41 Compensation Tool cutter compensation left (radius comp.)
G42 Compensation Tool cutter compensation right (radius comp.)
G43 Compensation Apply tool length compensation (plus)

Page 8 of 15
G44 Compensation Apply tool length compensation (minus)
G49 Compensation Tool length compensation cancel
G50 Compensation Reset all scale factors to 1.0
G51 Compensation Turn on scale factors
G52 Coordinate Local workshift for all coordinate systems:
add XYZ offsets
G53 Coordinate Machine coordinate system (cancel work
offsets)
G54 Coordinate Work coordinate system (1st Workpiece)
G55 Coordinate Work coordinate system (2nd Workpiece)
G56 Coordinate Work coordinate system (3rd Workpiece)
G57 Coordinate Work coordinate system (4th Workpiece)
G58 Coordinate Work coordinate system (5th Workpiece)
G59 Coordinate Work coordinate system (6th Workpiece)
G61 Other Exact stop check mode
G62 Other Automatic corner override
G63 Other Tapping mode
G64 Other Best speed path
G65 Other Custom macro simple call
G70 Canned Finish Turning Cycle
G71 Canned Rough Turning Cycle
G72 Canned Rough Facing Cycle
G73 Canned Pattern Repeating Cycle
G74 Canned Peck Drilling Cycle
G75 Canned Grooving Cycle
G76 Canned Threading Cycle
G80 Canned Cancel canned cycle
G83 Canned Face drilling cycle
G84 Canned Face Tapping cycle
G86 Canned Boring canned cycle, spindle stop, rapid out
G87 Canned Side Drilling Cycle
G88 Canned Side Tapping Cycle
G89 Canned Side Boring Cycle
G90 Coordinate Absolute programming of XYZ (type B and C
systems)
G90.1 Coordinate Absolute programming IJK (type B and C
systems)
G91 Coordinate Incremental programming of XYZ (type B and
C systems)
G91.1 Coordinate Incremental programming IJK (type B and C
systems)
G92 Coordinate Thread Cutting Cycle
G92 Motion Clamp of maximum spindle speed
G94 Motion Endface Turning Cycle
G96 Motion Constant Surface Speed ON
G97 Motion Constant Surface Speed Cancel
G98 Motion Feedrate per Minute
G99 Motion Feedrate per Revolution
M – Codes for Turning (Lathe)

Page 9 of 15
Page 10 of 15
G – CODES FOR MILLING

Page 11 of 15
Page 12 of 15
Page 13 of 15
M – CODES FOR MILLING

Page 14 of 15
Page 15 of 15

You might also like