Mitsubishi EDM
Published

CNC Machine Programming: Dealing with Spindle Probe Results in Real Time

There are several situations in which a CNC programmer must work with spindle probe results in the G-code program itself. Here are some strategies to consider.

Share

programming a CNC

There are two general types of machining center spindle probe applications: those that can be handled separately from the machining G code program and those that cannot.

Consider, for example, the need to measure a program origin in each axis and enter the results into fixture offset registers. This is done one time per setup, and the G-code program that machines the workpiece need not be involved.

The more challenging case is when probing results must be dealt with in real time during the execution of every CNC cycle and from within the G-code program. It can be especially problematic if you are using a CAM system to generate G-code programs since some CAM systems are not designed to generate probing commands, let alone deal with the results of probing.

There are at least four situations in which machining center spindle probes can help in real time.

When can machining center spindle probes help a CNC programmer?

  1. During setup: Maybe raw material comes in the form of castings or forgings. An operator may not be able to perfectly load and locate every raw workpiece. When the program is activated, a probe will first determine the workpiece’s angular orientation. The result is used to generate a corresponding coordinate rotation command that will be executed before machining is done.
  2. When error trapping: This technique is used to stop a program’s execution when a disruptive issue is found. The related logic in the G code will need to deal with at least two possibilities: If the problematic issue is not detected, the program can continue; if the issue is detected, the program must be stopped with an informative alarm generation command.
  3. Prior to machining: Spindle probes can help determine how machining must occur. The amount of cast raw material on a machined surface, for instance, may vary from one workpiece to the next. A CAM system can generate the motion commands for one of the roughing passes, but the logic required to determine and make the appropriate number of passes using the intended depth per pass must be included in the G-code program.
  4. During in-process gaging: Measuring with spindle probes for quality control purposes is controversial. One commonly accepted rule of thumb is that you shouldn’t measure the workpiece on the same machine that produced it. That said, you can use spindle probes to measure critical surfaces for the purpose of trial machining. After semi-finishing, the probe can determine how much more material must be machined so that offsets can be adjusted. The related logic commands must be included within the G-code program.

Spindle probe manufacturers provide a series of special programs (such as custom macros for FANUC controls) designed to get probing results. A simple calling command can, for example, tell the probe to find the location of a surface in any axis, the width of a slot, the height of a boss, the center of a hole, etc. Some CAM systems are designed with probing in mind and can create the necessary custom macro calling commands.

Even so, you will still be on your own to deal with the results the probe provides. Take a lesson from probe manufacturers: Don’t incorporate all of the related logic and motion commands into your G-code program. Instead, create your own series of custom macros to deal with probing results. This will minimize the number of commands you must include in your machining programs and keep you from duplicating effort when similar actions must be taken on multiple workpieces. One error-trapping custom macro, for instance, may work for any number of machining programs.

With FANUC custom macros, probe manufacturers store probing results in #100 series common variables. Consider, for instance, a cast surface that is varying in the Z (depth) axis from one workpiece to another. After probing, this Z position may be stored in common variable #133. Let’s say that this cast surface is supposed to be 1.1 inch above the program zero surface (finished to 1.0 inch), but it varies between 1.05 to 1.3 inches. After probing, the value of common variable #133 will range from 1.05 to 1.3.

After the machining program probes the surface, your simple calling command could look like N200 G65 P9501 V#133 B1.3 S1.05 Z1.0 Q0.05, where:

  • G65 is the G code used to call a custom macro;
  • P9501 is the custom macro program number;
  • V is the variable number from the probing result;
  • B is the big (high) limit for stock amount (alarm will sound if higher);
  • S is the small limit for stock amount (alarm will be sounded if lower);
  • Z is the finished surface Z-axis coordinate; and
  • Q is the depth per pass for roughing.

There could be more input variables depending on the application, such as those related to the shape of the surface to be machined if it is not generated by the CAM system. The calling command must provide the rough machining custom macro with the information needed to appropriately perform the roughing operation, regardless of how many passes are required.

Mitsubishi EDM
Thermo SL EDM Wire
Formnext Chicago on April 8-10, 2025.
IMTS 2024
High Accuracy Linear Encoders
BIMU 2024
The Automated Shop Conference
Hurco
DNS Financial Services America
Discover a variety of the best CNC machines
EZ Access - Have it all with Ez - Mazak
Gardner Business Intelligence

Related Content

Basics

Selecting The Right Welder

Many machine shops, on occasion, have a need for welding. It may be for maintenance purposes, repair or to fill the odd contract. This story is a welding process primer for those shops whose main business isn't welding but need to know some basics.

Read More

10 Tips for Titanium

Simple process considerations can increase your productivity in milling titanium alloys.

Read More

Understanding G27, G28, G29 and G30

Take a closer look at these reference position commands.

Read More
Sponsored

How to Reduce Cycle Times by 70% and More on Your Existing CNCs and Dramatically Improve Tool Life Too

By employing advanced high efficiency milling techniques for the entire machining routine, SolidCAM’s iMachining technology can drastically reduce cycle times while vastly improving tool life compared to traditional milling.

Read More

Read Next

Encountering Surface Finishes in the Everyday World

Surface measurement is becoming increasingly important to ensure proper performance of a manufactured product. Advanced surface measurement tools are not only beneficial in the manufacturing industry but also have unconventional applications.

Read More
Turning Machines

A History of Precision: The Invention and Evolution of Swiss-Style Machining

In the late 1800s, a new technology — Swiss-type machines — emerged to serve Switzerland’s growing watchmaking industry. Today, Swiss-machined parts are ubiquitous, and there’s a good reason for that: No other machining technology can produce tiny, complex components more efficiently or at higher quality.

Read More
Mitsubishi EDM