banner

Blog

Oct 30, 2024

Adjusting Feed Rate in Circular Motion Commands with G-Codes | Modern Machine Shop

While it is possible to calculate by hand adjustments to feed rate for circular milling operations, cutter radius compensation CNC programs streamline this process.

Previously, this column discussed an issue related to the feed rate required to make circular motions when targeting a constant contouring speed — specifically, with internal arcs or external arcs when removed material is balanced around a contour being machined (finish milling and near-net-shapes, for instance). The size difference between a milling cutter’s centerline path and the worksurface path requires increasing the linear motion feed rate for external circular moves and decreasing it for internal circular moves to achieve a constant contouring speed.

I demonstrated a method for determining the required modified feed rate for circular motions last month. But manually doing the related calculations is tedious, especially when using this technique regularly or for a variety of worksurface radius sizes. As long as one uses cutter radius compensation, and as long as the programmed coordinates reflect the worksurface path, the operator can enter the milling cutter’s radius size in a cutter radius compensation offset register.

When using right-hand milling cutters, the state of cutter radius compensation (G41-tool left, G42-tool right) helps determine whether a given circular command is machining an internal or external radius. Any G02 (clockwise arc) when the cutter is on the left side of machined surfaces (G41) will be an external arc. Any G03 (counterclockwise) will be an internal arc. The reverse is true when the cutter is on the right side of machined surfaces (G42). With FANUC Custom Macro, a program can access the cutter radius value from its offset register and access the current state of cutter radius compensation (G41 or G42).

I have created two user-defined G-code custom macros that make circular motions with the adjusted feed rate, naming them G102 (for clockwise) and G103 (for counterclockwise). I programmed them in the same manner as G02 and G03 (though they will not be modal). Each will compare the worksurface radius (specified by the R-word in the G102 or G103 command) with the cutter’s centerline path radius (calculated using the cutter radius from the offset register and the worksurface radius). They will then calculate the modified feed rate based upon the method shown previously and make the circular command using G02 and G03 with the modified feed rate.

Here are the two user-defined G-code programs:

To make these programs work as user-defined G codes, change two FANUC parameters (with current FANUC CNCs, they are parameters 6051 and 6052 for our example). After setting parameter 6051 to a value of 102 and 6052 to a value of 103, the CNC will execute program O9010 whenever it sees G102 and program O9011 whenever it sees G103.

Here is an example program that may be used for testing purposes. It is also a custom macro program, so the related variables may be easily modified. Prior to running this program, one must also set the value in the cutter radius compensation geometry offset (D register for offset 1 for this example) to the milling cutter’s radius.

By the way, if the cutter radius compensation offset register value is set to zero, the machine will use the work surface path. The cycle time will then come out nearly the same as when a value for the cutter radius is entered in the offset. The only time distance is related to the length of the motion is during the instating command for cutter radius compensation. This confirms that constant contouring speed is working as it should.

Notice that G102 is programmed just like G02: with X, Y and R. Local variables #24 (X), #25 (Y) and #18 (R) will be set accordingly. It calls program O9010, which will:

Nearly identical techniques are used with program O9011.

The transition into Swiss-type machining at Deking Screw Products required more than just a shift in production operations. It required a new mindset and a new way of running the family-owned business. Hardest of all, it required that one generation let go, and allow a new one to step in.

Mastercam 2025 incorporates big advancements and small — all based on customer feedback and the company’s commitment to keeping its signature product best in class.

TurnPWR was developed for lathe machinists to support manual and automated operation.

The way a G-code program is formatted directly affects the productivity of the CNC people who use them. Design CNC programs that make CNC setup people and operators’ jobs easier.

CNC users can program custom macros and T codes to ensure cutting tools are the proper length for tool length compensation in machining centers.

Maintaining a constant feed rate between linear and circular milling easily leads to chatter — for most applications, increase feed rate on external arcs and decrease it for internal.

Spend enough time on the shop floor and you will see some of the same mistakes time and again.

SHARE