Digital Readout Kit for Mills, Lathes, & Grinding
Published

External Input for Programmed Values

Parametric programming provides three easy ways to access external data.

Share

Leaders-In background

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.

KraussMaffei
Innovative Manufacturing for the Medical Industry
PMTS 2025 Register Now!
Hurco
Techspex
DN Solutions
DANOBAT
SolidCAM
715 Series - 5-axis complete machining
JTEKT
World Machine Tool Survey
Paperless Parts

Related Content

6 Machine Shop Essentials to Stay Competitive

If you want to streamline production and be competitive in the industry, you will need far more than a standard three-axis CNC mill or two-axis CNC lathe and a few measuring tools.

Read More
Sponsored

How to Mitigate Chatter to Boost Machining Rates

There are usually better solutions to chatter than just reducing the feed rate. Through vibration analysis, the chatter problem can be solved, enabling much higher metal removal rates, better quality and longer tool life.

Read More
Sponsored

ERP Provides Smooth Pathway to Data Security

With the CMMC data security standards looming, machine shops serving the defense industry can turn to ERP to keep business moving.

Read More
CAD/CAM

Orthopedic Event Discusses Manufacturing Strategies

At the seminar, representatives from multiple companies discussed strategies for making orthopedic devices accurately and efficiently.

Read More

Read Next

Registration Now Open for the Precision Machining Technology Show (PMTS) 2025

The precision machining industry’s premier event returns to Cleveland, OH, April 1-3.   

Read More

5 Rules of Thumb for Buying CNC Machine Tools

Use these tips to carefully plan your machine tool purchases and to avoid regretting your decision later.

Read More
Workforce Development

Building Out a Foundation for Student Machinists

Autodesk and Haas have teamed up to produce an introductory course for students that covers the basics of CAD, CAM and CNC while providing them with a portfolio part.

Read More
CNC Turnkey Package for Knee Mills and Lathes