The Bolt Circle

Put variables, trig and loops together into a real parametric program.

This is the classic. Four holes on a 40 mm circle around the G54 origin — but written so the count, the radius and the setup can all change without touching the moves.

Read firstParametric ProgrammingParametric CNC programming methodology: designing flexible programs with variables for families of parts, reducing setup time, and eliminating redundant programs.

Your turn

Drill 4 holes on a 40 mm radius circle centred on the G54 origin. Loop with #102 as the index; for each hole compute the angle into #120, the X into #121, the Y into #122, and emit a G01 X#121 Y#122 F300 move. Read the circle centre from the G54 origin registers so the program follows the setup.

The machine gives you

part zero at X50 Y25:#5221 = 50#5222 = 25
the same program with part zero at the machine origin:#5221 = 0#5222 = 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.