GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

CNC knowledge

Okuma Machine Tool Coordinate Calculation Function

This page explains how the Okuma machine tool coordinate calculation function turns a start point, a pitch and a count into finished hole positions inside the control. It is written for programmers and process engineers who already write G-code and want to know when to call it, what to feed it, and when hand-written coordinates are still the better answer.

OSP controlsHole gridsBolt circlesLess program text
Okuma machine tool coordinate calculation function on an OSP control panel
Quick read

Key takeaways

It is control-side mathThe OSP computes each hole position from one start point plus pitch and count.
It pairs with canned cyclesCall the pattern, then let the drilling cycle repeat at every computed point.
Best for regular patternsStraight grids, bolt circles and evenly spaced rows are its natural home.
Not for irregular featuresPockets, slots and contoured walls still need explicit geometry.
Mechanism

What the Okuma machine tool coordinate calculation function actually does

On an Okuma OSP control, the machine tool coordinate calculation function is a pattern generator. You give it a starting point, a pitch, a hole count and a direction. The control then computes every intermediate position from that rule instead of reading a long list of X and Y values from the program. The output is still ordinary motion. The tool still moves to real coordinates. The difference is where those numbers come from.

This matters because a bolt circle with 24 holes, or a plate with 8 rows of 12 holes, is a lot of program text. If the drawing changes the pitch from 25 mm to 30 mm, a hand-written program needs 96 edited lines. A pattern call needs one edited value. That is the whole argument for using it, and it is a strong one on repeat jobs.

The function is not a macro that runs on a PC and posts code. It executes inside the control at run time, using the same coordinate system the rest of your program uses. Work offset, tool length compensation and cutter compensation all still apply. If G54 is set wrong, every computed hole is wrong by the same offset. The math does not protect you from a bad setup.

  • 1
    One rule, many pointsStart point, pitch, count and angle define the whole pattern.
  • 2
    Runs at control levelNo external post-processor or CAM output is required.
  • 3
    Still normal motionOffsets, compensation and feed rates behave as usual.
Inputs

Inputs the control needs before it can compute a pattern

The first input is the reference point. In most shops this is the first hole, not the pattern center. That choice matters. If you define the pattern from hole one, a small error in the start position shifts the whole grid. If you define it from the center, the holes spread outward from a single measured feature, which is usually easier to verify with a probe.

The second input is the spacing rule. For a straight grid that is an X pitch and a Y pitch, plus a count in each direction. For a bolt circle it is a radius and an angular step, usually entered as a total angle divided by the number of holes. For an arc row it is a radius plus a start angle and an end angle.

The third input is orientation. A grid can run parallel to the machine axes, or it can be rotated by an angle so it follows a slanted face. Rotating the pattern is much cheaper than rotating the workholding, as long as the angle is known exactly. If the angle comes from a rough casting face, measure it first and enter the measured value.

Finally, the control needs to know which plane it is working in. G17 for XY, G18 for XZ, G19 for YZ. Get this wrong and the pattern appears in a plane you did not intend, which is usually obvious on the first hole and expensive on the twentieth.

  • 1
    Reference pointHole one or pattern center. Pick one and stay consistent.
  • 2
    Spacing rulePitch and count, radius and step, or radius and angles.
  • 3
    OrientationAxis-aligned or rotated by a measured angle.
  • 4
    Working planeG17, G18 or G19 must match the drawing view.
Pairing

Pairing the pattern call with canned cycles

The coordinate calculation function is most useful when it is combined with a canned cycle axis shift call. In that arrangement, you describe the hole pattern once, and the drilling, tapping or boring cycle repeats at each computed point. You do not write a cycle block per hole. You write one pattern definition and one cycle.

This is where the program gets short. A 40-hole pattern in a plate might drop from 160 lines to under 20. Shorter programs are easier to read, and they are much harder to get wrong during a manual edit at the machine. When an operator changes a feed rate at 2 a.m., fewer lines means fewer places to introduce a typo.

There is a practical limit. Deep-hole peck cycles with a long retract, or tapping cycles that need a different spindle speed per hole, do not always fit neatly inside a repeated pattern. In those cases it is often cleaner to keep the pattern for position and call the cycle explicitly where the parameters change.

Keep the pattern call and the cycle call adjacent in the program. If someone inserts a tool change between them, the pattern state may not survive the way you expect. Adjacent lines are also far easier to audit during a prove-out.

  • 1
    Pattern once, cycle onceOne definition drives every hole in the group.
  • 2
    Short programs edit saferFewer lines, fewer chances for a manual typo.
  • 3
    Some cycles need exceptionsVarying speeds or deep pecks may need explicit calls.
Accuracy

How computed positions affect accuracy and tolerance

Computed positions are exact to the control's internal resolution. They are not rounded to the drawing's two decimal places unless you round them. That is usually an advantage, but it can surprise a programmer who expects the machine to land on 25.00 mm exactly. On a bolt circle with a radius that does not divide evenly, the control will place holes at the true trigonometric positions.

The real accuracy limit is mechanical, not mathematical. Ball screw pitch error, thermal growth and backlash set the floor. On a well-maintained machine, position repeatability is a fraction of the machining tolerance. At GreatLight we hold ±0.005 mm (±0.0002 in) on production parts, and the pattern math is never the limiting factor at that level.

Surface finish on the hole wall is set by the cycle, not the pattern. A drilled hole in 6061 aluminium might sit at Ra 1.6–3.2 μm as machined. A reamed or bored hole can reach Ra 0.8–1.6 μm. The coordinate function only decides where the tool goes, not how the wall looks when it gets there.

One caution: if you rotate a pattern by a computed angle, the control's rounding on that angle propagates to every hole. A 0.001° error over a 300 mm radius is roughly 0.005 mm of position shift. That is still inside most tolerances, but on a long pattern it is worth checking before you commit to a full run.

  • 1
    Math is exactPositions follow true trigonometry, not drawing rounding.
  • 2
    Machine sets the floorScrew error and thermal growth dominate at tight tolerance.
  • 3
    Finish comes from the cycleDrilling, reaming and boring decide the wall quality.
Limits

Where the function helps and where it does not

It helps most on regular, repeated geometry. Flange bolt circles, heat exchanger tube sheets, fixture plates, cover plates and perforated panels are all natural fits. Any pattern where a human would say "every 25 mm" or "every 15 degrees" is a candidate.

It helps less on one-off features. If a plate has five holes at five unrelated positions taken from a customer model, writing five coordinate pairs is faster than building a pattern rule and then fighting it. The function rewards repetition and punishes irregularity.

It does not help at all with contour geometry. Pockets, slots, chamfered edges, threads and curved walls need explicit tool paths. Some programmers try to use a grid to approximate a curve by placing many small holes along it. That produces a scalloped edge and a long cycle time. Use a proper contour path instead.

There is also a maintenance consideration. A pattern-based program is compact but it hides the individual hole positions. If a customer asks for the exact X and Y of hole 17, someone has to run the math. Keep a printed coordinate table with the setup sheet so the shop floor can answer that question without opening the control.

  • 1
    Good fitBolt circles, tube sheets, fixture plates, repeated grids.
  • 2
    Poor fitA handful of unrelated holes from a customer model.
  • 3
    Wrong toolPockets, slots and curved walls need contour paths.
On the floor

Practical checks before you run a pattern at the machine

Verify the plane first. Call G17, G18 or G19 and watch the position display change. A pattern in the wrong plane is the single most common mistake with this function, and it is easy to catch before the first hole if you look at the display.

Dry run the first hole. Single block through the approach, confirm the tool is over the correct feature, then let the cycle complete one hole. Measure that hole. If hole one is right and the pitch is right, hole twenty will be right too, assuming the machine is in good condition.

Check the count, not just the pitch. A pattern with 23 holes instead of 24 will still look correct on the first few positions. Count the holes on the drawing, count them in the program, and count them after the run. This takes ten seconds and saves a scrapped part.

Confirm the rotation angle with a probe or an indicator if the pattern is rotated. Do not trust an angle read off a drawing that was itself derived from a model. Measure the actual feature on the part, enter the measured angle, and record it on the setup sheet for the next run.

  • 1
    Plane before patternConfirm G17, G18 or G19 on the display.
  • 2
    Prove hole oneSingle block, measure, then release the full cycle.
  • 3
    Count the holesCompare drawing, program and finished part.
Decision guide

Pattern call versus written coordinates

Use this when choosing how to program a group of features.

SituationPattern callWritten coordinatesWhy
Bolt circle, 12 holesYesNoOne radius and step replace 12 pairs
Grid plate, 8 x 12 holesYesNoCount and pitch are the whole definition
Five unrelated holesNoYesNo shared spacing rule exists
Slanted face, known angleYesSometimesRotated pattern avoids re-fixturing
Slanted face, rough castingMeasure firstMaybeEnter the measured angle, not the nominal
Pocket or slot contourNoYesPattern math cannot describe a curve
Tapping with varied speedsMixedYesPer-hole parameters break the repeat
Drawing revision on pitchYesNoOne value changes, not every line

Use the pattern call for repetition, write coordinates for exceptions

If the features share one spacing rule, let the Okuma machine tool coordinate calculation function generate them and keep the program short. If the features are irregular, or the cycle parameters change hole to hole, write the coordinates out and keep the program obvious.

FAQs

Questions engineers ask about pattern programming

Does the pattern call change the coordinate system?

No. It computes positions inside the active work offset, using the same G54 to G59 frame as the rest of the program.

If you switch work offsets mid-pattern, the reference point moves with it. Keep the pattern inside one offset to avoid confusion.

Can I use it for a rotated grid on a slanted face?

Yes, as long as you know the rotation angle accurately. Enter the measured angle rather than the nominal drawing angle if the face comes from a casting.

On a 300 mm radius, a 0.001° angle error shifts a hole by roughly 0.005 mm. That is small, but it stacks across a long pattern.

Why did my pattern appear in the wrong plane?

The active plane code was wrong. G17 is XY, G18 is XZ and G19 is YZ. The pattern follows whichever plane is active when the call executes.

Check the position display during a dry run. It shows the plane immediately, before any material is cut.

Does it help with surface finish on the holes?

No. The coordinate function only decides position. Finish comes from the cycle and the tool.

In aluminium, as-machined drilling typically lands around Ra 1.6–3.2 μm. Reaming or boring can bring that to Ra 0.8–1.6 μm.

What tolerance can I expect on a computed pattern?

The computed positions are exact to the control's internal resolution. The real limit is the machine: screw pitch error, thermal growth and backlash.

On a maintained machine, position repeatability sits well below the part tolerance. Our production work holds ±0.005 mm (±0.0002 in).

Should I keep a printed coordinate table for pattern programs?

Yes. A pattern call hides the individual positions, and someone will eventually ask for the exact X and Y of one hole.

Keep a table with the setup sheet so the shop floor can answer without opening the control.

Send us the drawing and we will check the pattern

Upload your part file and we will review the hole layout, the tolerance and the best way to program it. Quotation and free DFM analysis within 12 hours.

12-hour quoteFree DFM analysis100% inspectionNDA on request

Follow

More CNC knowledge from GreatLight

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC