Robot gripper lowering a cylinder into one of a rectangular tray's regularly spaced circular pockets.

What you need

Measure pocket pitch and choose a tray-frame origin. Use dummy coordinates in a spreadsheet or simulator before teaching hardware.

X positions of four columns. Column 0: 100 mm; Column 1: 130 mm; Column 2: 160 mm; Column 3: 190 mm.
X positions of four columns. Original Academy diagram using illustrative values; not a measured hardware result.
Read the diagram as a data table
Values used in the illustration
Condition or componentmm
Column 0100
Column 1130
Column 2160
Column 3190

The calculation

x(i,j) = x₀ + i × p_x
y(i,j) = y₀ + j × p_y

i and j are zero-based column and row indices; p_x and p_y are pitch in mm. Positions are local to the tray frame.

Worked example

Illustrative numbers. Replace them with your measured inputs.

For origin (100, 50) mm and pitch (30, 25) mm, pocket i=2, j=1 lies at (160, 75) mm. A 4-column by 3-row tray contains 12 pockets, with final local x=190 mm and y=100 mm.

Try it step by step

  1. Measure the first and last pocket to check cumulative pitch error instead of trusting a nominal drawing alone.
  2. Generate all coordinates offline and inspect row order, index limits and the chosen empty-pocket handling rule.
  3. Add approach and retreat heights as distinct poses and transform the tray coordinates through its measured fixture frame.
  4. Validate the corner pockets and the loaded tool’s clearance before a supervised dry run of the full pattern.

How to check the result

Print the generated pocket list and verify it against physical pocket numbering. The final count and corner coordinates must match the drawing.

Common mistake to avoid

Mixing one-based human labels with zero-based code shifts every target. Never use a tray loop without bounds checks and a valid occupancy state.

Reference reading

Primary references for the underlying models, APIs or application context. The worked numbers and plots above are educational calculations, not results reported by these sources.

Read our methods, limitations and safety notes.