Variable Programs
One of the best options on CNC machines allows for the use of
variables within a part program.
The classic use for program variables is
with family-of-parts, where there are a range of parts with the same
features but different dimensions for these features. A good example
of this is found when machining shaft type parts used in electrical
motors. These parts come in various sizes, designed for motors of
all sizes from fractional horsepower motors to large frame-size
motors. These shafts are designed with the same basic shape but the
features being proportionately larger as the HP size increases.
All CNC units allow for the use of these
variables in the program. With some controls, this feature is an
option that can be ordered when the machine is first purchased. I am
fortunate, our machines are equipped with Mitsubishi controls fully
equipped for variable programming.

On this simple shaft, the geometry is
defined in terms of variable numbers for each feature.
All the part features are listed at the
beginning of the program to machine this part. For example, on this
part, the variable number 502 represents the overall length of the
part. The entire geometry can be defined in this manner.
#500 = 5.500 (overall length)
#502 = 3.125 (to first shoulder)
#504 = #502 – 1.300
To avoid confusion in programming, use even
number variables for part lengths and odd number variables for part
diameters. Remember to include a comment by each variable to clearly
identify the part feature defined by that variable.
When writing the main program, the use of
the variable numbers tell the control to machine the part features
to the specified variable length. |
Advantages
of variable programming
This programming method is a time saver. A
single program can be built to produce a wide range of similar
parts.
In addition to part features, speeds and
feeds can also be defined as variables. With the RPM calculation
nested inside the program, the control can change the speed and
feeds depending on the size of the part. This may be advantageous
for drilling RPM.
First define the drill diameter, #540 = 0.562 (Insert drill size).
Next define the cutting SFPM using variable #542 = 500 (SFPM)
#550 = #542 * 3.82 / #540
The SFPM and drill size are defined as
variables (#542 and #540 in the example above) and the control
automatically calculates the RPM.
Variable programming is also used to ensure
that offset values do not exceed a certain range. Everyone has heard
stories, the set-up man forgot to load a workshift offset, resulting
in a crash. Or the situation where a large value was inadvertently
entered into a wear offset, resulting in a scrapped part. With an
offset range set and the offset entered as a variable, the control
does not accept offset values outside the set range.
These variable programming features are
standard on our Mitsubishi controls and also most Okuma controls.
You must request that this option be turned on with most Fanuc
controls. A nominal charge will be required for this service.
The use of variables can bring the power of
a CAM programming system direct to your CNC machine. What's the big
challenge when using variables?
Well, the greatest challenge when using
variables is ensuring that machine operators enter the correct
variables. Remember the rule with CNC programming, garbage in and
garbage out.
To make the next member of the family part,
the operator is expected to enter the correct variable values. This
is well within the capabilities of your good shop people.
Variable programming is very powerful and
should be applied for efficient programming and machining.
|