top of page

Using offset information to make programs more intelligent

Custom macro B provides the ability to read and write offset data from and to a CNC program – and this has been the topic of many past articles in this newsletter. We’ve shown many applications for reading and writing offset data – most have been related to facilitating the way that setups are made or confirming that offset data is correct.


I was recently in a company that had a rather unique problem, one that could be solved by utilizing this ability to read offset data. It involved cutter radius compensation. As you know, cutter radius compensation lets you use a range of cutter sizes – and the operator simply enters the radius of the cutter currently being used into the cutter radius compensation offset. The machine, of course, uses this data to keep the tool the appropriate distance away from the programmed surface.


With most applications that use cutter radius compensation, the range of cutter sizes is relatively small. If the programmer intends to use a 1.0 inch diameter end mill, for instance, the setup person will use a cutter that is close to – likely slightly smaller than –1.0 in diameter (smaller would be for a sharpened cutter). The small deviation in cutter size (from the planned cutter size to the actual cutter size) isn’t usually enough to warrant a recalculation of cutting conditions – that is – spindle speed and feedrate.


The company I recently visited has a special problem in this regard. They use slotting cutters that range in diameter (even for a given job) from 3.0 to 4.5 inches. With this large range in cutter sizes, a change in speed and feed are important when going from a small cutter diameter to a large cutter diameter – and vise-versa. So the setup person and operator were actually recalculating cutting conditions and editing the program whenever a slotting cutter was replaced.


As you have probably determined by now, having access to offset data provides the ability to eliminate the need to recalculate speed & feed and edit programs. We simply changed the program to perform the speed and feed calculation based upon the value that is in the cutter radius compensation offset register.


Here’s how. Say the cutter’s radius is placed into offset number 31. For many Fanuc controls, the system variables that provide access to offsets range in the 2000 series. #2001 gives access to offset one, #2002 gives access to offset two, and so on. So system variable #2031 gives us access to offset number thirty-one. (You must confirm system variable numbers for offset access based upon your control model in the custom macro section of the programming manual.)


So we replaced the S word and F word with these:

  • S[3.82*120/[#2031*2]] (Running at 120 sfm)

  • F[3.82*120/[#2031*2] * 0.021] (Running at 0.021 ipr)

Since #2031 contains the cutters radius, we must – of course – double this value to come up with the cutter’s diameter for use within the calculations.


Note that larger cutters tend to have more teeth, meaning the inches-per-minute feedrate may also change based upon the cutter size. Though this criteria is not included in our example, it could be if you know the number of teeth for the different cutters that can be used. It would be relatively easy to determine which cutter is being used – along with its number of teeth – with a series of IF statements that test the value of #2031.


Other times when accessing offset data can make programs more intelligent

Eliminating cutter radius (or tool nose radius) compensation – Use the value in the radius compensation offset register during motion commands. This will eliminate the need for G41 and G42 – and the potential for cutter comp. alarms.


Use the T register on turning centers for more than tool nose radius compensation. By knowing the type of tool being used (turning tool, boring bar, etc.), you may be able to move to a more efficient safe index position for turret indexing.

93 views0 comments

Recent Posts

See All

Tapping on a turning center (without canned cycles)

Unless your Fanuc controlled turning center came with live tooling, it’s likely that you don’t have canned cycles (G80-G89) like those you find on machining centers. You might have G74 and G75, the mu

Can you speed up your tool change time?

Machining centers, of course, have automatic tool changing devices to automate the tool changing process. Current models boast very fast tool changing times and you may be quite satisfied with tool ch

bottom of page