Parametric Programming for CNC Machining and Turning Centers
Since parametric programming encompasses such a broad field with so many
possibilities, we need to qualify and limit the scope of this class.
Versions of parametric programming covered
Just as there are many versions of computer programming languages (BASIC,
FORTRAN, C Language, PASCAL, etc.), there are many versions of parametric
programming. In fact, with the exception of Fanuc-compatible controls, almost
every control manufacturer has their own special version of parametric
programming. And just as the different computer programming languages vary with
regard to complexity and capability, so do the different versions of parametric
programming. Some CNC control manufacturers even have multiple versions of
parametric programming within their own product lines.
It would be impossible for this class to show every technique available from
every version of parametric programming. Instead, our presentations will be
heavily application-based. We'll begin by ensuring that you understand what can
be done. Once general discussions relative to an application or parametric
programming feature have been presented, we will then show specific examples in
three popular versions of parametric programming. If you can understand the
general presentations, and if you can see how features of parametric
programming are applied in three popular versions, you should be able to adapt
what you know to virtually any version of parametric programming.
Custom macro B - A great deal of thought went into determining
which specific versions of parametric programming would be addressed in this
class. Since custom macro B is the most popular version of parametric
programming (several CNC control manufacturers supply custom macro B), and
since several other versions of parametric programming strongly resemble custom
macro B, it made an obvious choice. And indeed, we place the heaviest emphasis
on custom macro B throughout the class, including material in the PowerPoint
slide presentations as well as in the course text.
Unfortunately, custom macro B was developed over fifteen years ago, and has
not changed substantially in all this time. As anyone familiar with computer
technology knows, a lot has happened in the last fifteen years to help computer
programmers. If you have been working with the latest version of BASIC or C
language, be ready to step back a few years if you are going to be working with
custom macro B. While custom macro B is still a very powerful and formidable
version of parametric programming, programming with it is rather crude by
today's computer programming standards.
Okuma's user task 2 - In similar fashion, Okuma's user task 2
was developed over ten years ago and is representative of CNC control
manufacturer based parametric programming versions. You will find that many of
the functions of user task 2 closely parallel custom macro B. Note that we
include presentations for user task 2 only in the course text (not in the
PowerPoint slides).
Fadal's macro - The current trend in CNC technology is toward
personal computer-based CNC controls. Many of the PC based CNC control
manufacturers incorporate the best features of current computer programming
languages in their versions of parametric programming. Fadal's version of
parametric programming, called macro, resembles more current versions of BASIC.
When it comes to the computer-related features, it will be quite easy to adapt
to Fadal's macro f you have experience with current versions of BASIC. Several
other control manufacturers utilize current versions of BASIC in their version
of parametric programming, though they may not be completely compatible with
Fadal's macro. Note that we include presentations for Fadal's macro only in the
course text (not in the PowerPoint slides).
Machine types
There are excellent applications for parametric programming with just about
every kind of CNC machine tool in existence today. Though this is the case, we
limit our presentations to include the two most popular machine types, the CNC
machining center and CNC turning center. Again, if you can understand how
parametric programming can be applied to these popular machines, you should be
able to adapt what you know to other forms of CNC equipment.
Prerequisites
While we assume nothing of your current knowledge of parametric
programming, we do assume you possesses a firm understanding of manual
programming for the CNC equipment they will be working with. In almost all
applications, you will be merging parametric programming techniques with manual
programming. We will be explaining only the parametric programming functions,
assuming that you understand the G code level manual programming commands being
used.
An understanding of computer programming also helps with parametric
programming. While we will not assume you have this background and will explain
the basics of each computer-programming-like feature we address, we do
recommend that readers with absolutely no prior computer programming experience
purchase one of the excellent beginner's books on a computer programming
language like BASIC or C Language to reinforce our presentations. These books
can be found in your local book store or library.
Presentation method
You may have picked up your CNC control manufacturer's programming manual
and tried to read their section on parametric programming. If you have, you
have probably been somewhat frustrated, since most control manufacturer's
manuals tend to be written in reference format. Like a disk operating system
(DOS) reference manual for personal computers, the parametric programming
section of most control manufacturer's manuals tend to assume you already know
what you want to do and give only the correct syntax for each word or feature.
Few explain the implications of when a given word or feature could be helpful.
Fewer still show comprehensive examples for all features.
By comparison, this class will be tutorial in nature. We will, of course,
show the correct syntax for each word or command we show, but more importantly,
we will stress the implications of why each feature can be helpful. We will
also show many example programs. And by the way, when you are finished with
this text, you should be able to easily understand your control manufacturer's
descriptions relative to parametric programming.
Course outline:
Introduction to parametric programming
Definition of parametric programming
Comparison to sub programming
Comparison to computer programming
Five application categories
Introduction to the computer-related features
Introduction to the CNC-related features
Variable techniques
What are variables?
Arguments
Local variables
Common variables
Permanent common variables
System variables
Applications and examples
Arithmetic capabilities
Basic arithmetic operators (+, -, *, /)
Trig functions
Absolute value
Rounding functions
Other arithmetic functions
Combining operations into an expression
Priority of arithmetic operators
Logic and program flow control
Introduction to program flow control
Statement labels
Unconditional branching
Conditional branching
Applications and examples for conditional branching
Generating loops
Applications for loops
Steps to looping
A loop that counts to ten
Solving the problems of a loop
Bolt circle example
Multiple pass grooving example
System variables
Introduction to CNC-related features
General application system variables
Alarm generation
Stop with message
Suppression of feed hold, single block, and feedrate override