Bolt Circle From a Probed Centre

Put reading, trig and a loop together into a real parametric drill pattern.

The classic. Holes evenly spaced on a circle, centred on a point the probe measured — written so the count, the radius and the probed centre can all change without touching a single move.

Read firstCoordinate Systems & Work OffsetsA cross-control primer on CNC coordinate systems: machine vs work coordinates, the reference point, work offsets G54–G59 and the extended set, G52/G92/external offsets, how each control (Fanuc, Haas, Mazak, Mitsubishi, Siemens, Heidenhain, Okuma) names its offset registers, and how to set an offset manually, with G10, or from a macro.

Your turn

Drill 4 holes on a 40 mm radius circle centred on a probed point — its X in Q115, its Y in Q116. Loop with Q3 as the index; for each hole compute the angle into Q4, the X into Q5, the Y into Q6, and emit an L X+Q5 Y+Q6 R0 FMAX move.

The machine gives you

probed centre at (50, 25):Q115 = 50Q116 = 25
the same program with the centre at the origin:Q115 = 0Q116 = 0

Your program is run once for each set of conditions. It has to work for all of them.

Loading...

This is a learning simulation — always prove out a program on the actual control before you cut metal.