23-05-2012, 12:34 PM
CNC Programming
Introduction to CNC.pdf (Size: 782.47 KB / Downloads: 157)
Introduction to CNC
CNC was preceded by NC (Numerically Controlled) machines, which were hard wired and their operating
parameters could not be changed. NC was developed in the late 1940s and early 1950s by
John T. Parsons in collaboration with the MIT Servomechanisms Laboratory. The fi rst CNC systems
used NC style hardware, and the computer was used for the tool compensation calculations and
sometimes for editing.
Punched tape continued to be used as a medium for transferring G-codes into the controller for many
decades after 1950, until it was eventually superseded by RS232 cables, fl oppy disks, and now is
commonly tied directly into plant networks. The fi les containing the G-codes to be interpreted by the
controller are usually saved under the .NC extension. Most shops have their own saving format that
matches their ISO certifi cation requirements.
Types of instruction
A line in a G-code fi le can instruct the machine tool to do one of several things.
Movements
The most basic motion for a controller is to move the machine tool along a linear path from one point
to another. Some machine tools can only do this in XY, and have to accept changes in Z separately.
Some have two further axes of rotation to control the orientation of the cutter, and can move them
simultaneously with the XYZ motion. Lately 4 and 5 axis machines have become popular. The 2 additional
axis allow for the work surface or medium to be rotated around X and Y. For example, a 4-axis
machine can move the tool head in XY and Z directions, and also rotate the medium around the X or
Y axis, similar to a lathe. This is called the A or B axis in most cases.
All motions can be built from linear motions if they are short and there are enough of them. But most
controllers can interpolate horizontal circular arcs in XY.
Lately, some controllers have implemented the ability to follow an arbitrary curve ( NURBS), but these
efforts have been met with skepticism since, unlike circular arcs, their defi nitions are not natural and
are too complicated to set up by hand, and CAM software can already generate any motion using
many short linear segments.
With the advent of the vortech router cnc quad drive system which utilizes four (bidirectional) motors
and drive, users are able to achieve greater speeds and accuracy
Drilling
A tool can be used to drill holes by pecking to let the swarf out. Using an internal thread cutting tool
and the ability to control the exact rotational position of the tool with the depth of cut, it can be used to
cut screw threads.
Drilling cycles
A drilling cycle is used to repeat drilling or tapping operations on a workpiece. The drilling cycle accepts
a list of parameters about the operation, such as depth and feed rate. To begin drilling any number
of holes to the specifi cations confi gured in the cycle, the only input required is a set of coordinates
for hole location. The cycle takes care of depth, feed rate, retraction, and other parameters that appear
in more complex cycles. After the holes are completed, the machine is given another command
to cancel the cycle, and resumes operation.
Parametric programming
A more recent advancement in CNC interpreters is support of logical commands, known as parametric
programming. Parametric programs incorporate both G-code and these logical constructs to create
a programming language and syntax similar to BASIC. Various manufacturers refer to parametric
programming in brand-specifi c ways. For instance, Haas refers to parametric programs as macros.
GE Fanuc refers to it as Custom Macro A & B, while Okuma refers to it as User Task 2. The programmer
can make if/then/else statements, loops, subprogram calls, perform various arithmetic, and
manipulate variables to create a large degree of freedom within one program. An entire product line of
different sizes can be programmed using logic and simple math to create and scale an entire range of
parts, or create a stock part that can be scaled to any size a customer demands.