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.

Techspex
SolidCAM
Paperless Parts
IMTS 2024
Starrett 2900 Series Digital Indicator
MMS Top Shops
World Machine Tool Survey
High Accuracy Linear Encoders
The view from my shop.
Precision Components
Hurco
Mazak - Innovative manufacturing for medical

Related Content

5 G-Code Tips for Increasing CNC Efficiency

Optimizing G code is a low-cost way to improve CNC efficiency without sacrificing usability and safety.

Read More

When to Use Custom Macros With a CAM System

Custom macros can offer benefits even when using a CAM system to prepare programs – but must be implemented with the right considerations.

Read More
Basics

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
SPONSORED

How this Job Shop Grew Capacity Without Expanding Footprint

This shop relies on digital solutions to grow their manufacturing business. With this approach, W.A. Pfeiffer has achieved seamless end-to-end connectivity, shorter lead times and increased throughput.

Read More

Read Next

Shop Management Software

5 Tips for Running a Profitable Aerospace Shop

Aerospace machining is a demanding and competitive sector of manufacturing, but this shop demonstrates five ways to find aerospace success.

Read More

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
CNC Turnkey Package for Knee Mills and Lathes