Digital Readout Kit for Mills, Lathes, & Grinding
Published

External Input for Programmed Values

Parametric programming provides three easy ways to access external data.

Share

Standard CNC programs lack intelligence. They are executed sequentially, commands result in predetermined action/s and words for each command are fixed.

Parametric programming provides additional capabilities, and various compensation types such as fixture offsets, tool length and cutter radius compensation allow programs to reference data from outside the program. These data are typically stored in offset registers and affect the way a CNC program performs.

Certain applications require CNC programs to access other data from outside the program in much the same way that compensation does. These applications exceed the limits of what is possible with standard G code. With parametric programming, however, it is easy to make programs access external data.

Sources for external data include offset registers, permanent common variable registers and input signal terminals on a printed circuit board. Parametric programming system variables allow access to each type.

For offset access, most CNCs use a system variable name or number that corresponds to the offset register being accessed. For a popular FANUC CNC machining center model, system variable #2001 provides reading and writing access to the register for geometry offset number one, #2002 provides access to register number two, and so on. While each kind of offset is accessed with a different series of system variables, rest assured that you can access any offset register if you know the corresponding system variable name or number.

Permanent common variables are much like offset registers. You can enter them using the MDI panel keyboard, or data can be entered by some other source (maybe the results coming from a probing program). While the naming/numbering for these system variables vary, FANUC uses a series of system variables beginning with #500 to access them. Permanent common variable #501, for example, is used to access (read and write) the value in the permanent common variable register number 501.

Input and output terminals are accessed through a series of system variables ranging from #1100 to #1131 for inputs and from #2000 to #2031 for outputs. Each corresponds to a printed circuit board terminal location. If the terminal is active/on (current is flowing), the value of the corresponding system variable will be 1. If the terminal is inactive/off (current is not flowing), its value will be 0. For example, when terminal location number 2 is active, the value of system variable #1102 will be 1.

Which method you will use to store/access data will depend on your application. Sometimes it makes sense to place related data in offset registers, especially if the data is related to workholding or cutting tools. Other times, it is more logical to place the data in permanent common variables, especially if the data is more related to machine usage than tooling. Input/output terminals are important if external devices are being used that must provide feedback information to the CNC.

How data are placed in data registers also varies. In some applications, the operator will enter data through the MDI panel keyboard. In others, the data are entered by an external device, like a touch probe or post process gaging system. In another application, a machine sensor (like one that monitors the angular position of a rotary table) is connected to an input/output terminal.

What are some ways to access external CNC program data?

Here are three ways to access external data, with an example for each application:

  1. Offset Register Access: Enhancing Wear Offsets

There are times when the turning center operator cannot easily determine the amount of adjustment needed for a sizing adjustment. Consider a dimension specified over a ball (see Figure 1). Instead of calculating the offset adjustment amount, which requires trigonometry, have the operator store the measurement taken over the ball in an unused offset register. The program can then reference this value in a calculation that determines how to adjust the X- and Z-axis motions required to correctly machine the taper.

  1. Permanent Common Variable Access: Automating Program-Zero Assignment

The center of a round workpiece, when held in a V-block clamp (see Figure 2), will vary in a predictable way based on workpiece diameter. Instead of measuring this position every time a setup is changed, have the operator enter the workpiece diameter in a permanent common variable. The program can reference this value to determine the center position and then specify an appropriate value into the corresponding fixture offset register.

  1. Input Signal Terminal Access: Determine Rotary Device Position

If a rotary table is in the wrong angular position when a program is activated or restarted, the results could be disastrous. A sensor mounted to the rotary table (possibly a limit switch) can be connected to an input signal terminal in such a way that, when the appropriate side of the table is facing the spindle, the current will flow at the terminal. The program can test whether this terminal is active. If it is not, it can generate an alarm.

To any Measurement Question there is an Answer
MMS Made in the USA
The view from my shop.
World Machine Tool Survey
Hurco
Koma Precision
DN Solutions
High Accuracy Linear Encoders
Kennametal
Norton Superabrasives Wheels  Paradigm Plus
Techspex
Paperless Parts

Related Content

Understanding CNC Machine Accuracy and Repeatability

Properly evaluating machine tool capability requires understanding how the both user and the builder can influence precision.

Read More

Understanding G27, G28, G29 and G30

Take a closer look at these reference position commands.

Read More

Generating a Digital Twin in the CNC

New control technology captures critical data about a machining process and uses it to create a 3D graphical representation of the finished workpiece. This new type of digital twin helps relate machining results to machine performance, leading to better decisions on the shop floor.

Read More
Basics

7 CNC Parameters You Should Know

Parameters tell the CNC every little detail about the specific machine tool being used, and how all CNC features and functions are to be utilized.

Read More

Read Next

3 Mistakes That Cause CNC Programs to Fail

Despite enhancements to manufacturing technology, there are still issues today that can cause programs to fail. These failures can cause lost time, scrapped parts, damaged machines and even injured operators.

Read More
Large Part Machining

The Cut Scene: The Finer Details of Large-Format Machining

Small details and features can have an outsized impact on large parts, such as Barbco’s collapsible utility drill head.

Read More
CNC Turnkey Package for Knee Mills and Lathes