Problem: One Pick Point, Many Place Points
The classic pick-and-place cell has a fixed pick location (feeder, conveyor stop, nest) and a place location that must change on every cycle - a tray of pockets, a carton grid, a pallet layer, or a test fixture with N positions. Teaching every place waypoint by hand does not scale: a 6 x 4 x 3 pattern is 72 taught poses, and a single change to pack pitch means re-teaching all of them.
Two implementation strategies solve this, and the choice drives everything downstream (cycle time, recovery behavior, how a technician changes formats):
- Pattern / palletizing wizard - the robot's programming environment generates the sequence internally from a few taught corner points and counts.
- Computed pose offsets - you keep a single taught reference pose and add a calculated X/Y/Z offset from an index counter in program logic.
Choosing Between a Wizard and Computed Offsets
| Criterion | Pattern / Palletizing Wizard | Computed Pose Offsets |
|---|---|---|
| Setup effort | Low - teach corner points, enter counts | Moderate - write index math, define reference frame |
| Handles skewed/non-square pallets | Yes, if the wizard supports 3- or 4-corner definition (interpolates across the taught corners) | Yes, but you must build the interpolation yourself |
| Runtime pattern change (recipe/format) | Limited - counts are usually configured, not commanded | Full - counts, pitches and origin can come from a PLC or HMI recipe |
| Resume after E-stop / power cycle | Depends on whether the wizard's internal counter is retentive | Deterministic if you store the index in a retentive variable |
| Partial layers / skip positions | Awkward - usually all-or-nothing | Easy - test the index against a skip map before moving |
| Maintenance by non-programmers | Good - guided re-teach of corners | Requires understanding of the offset logic |
Rule of thumb: if the pattern is fixed for the life of the machine and the operator only ever re-teaches the pallet corners after a fixture bump, use the wizard. If part size changes with product, or a PLC owns the recipe, use computed offsets and expose the parameters as variables.
Pattern Math: Index to Cartesian Offset
Every variable-place scheme reduces to converting a single integer counter into a 3D offset. Use a zero-based index i that runs 0 .. (Nx*Ny*Nz - 1):
col = i mod Nx
row = (i div Nx) mod Ny
layer = i div (Nx * Ny)
dX = col * pitchX
dY = row * pitchY
dZ = layer * pitchZ ; layer height = part height + interleave/slip sheet
Place pose = reference pose (position 0,0,0 of the pattern) translated by dX, dY, dZ expressed in the pallet frame, not the robot base frame. This distinction is the single most common source of skewed patterns: if you add the offset in base coordinates while the pallet sits at an angle, the rows walk off the pallet as the index grows.
Serpentine (boustrophedon) order
To minimize travel, reverse alternate rows:
IF (row mod 2) = 1 THEN
col = (Nx - 1) - col
END_IF
Four-corner interpolation for out-of-square pallets
When the pallet or tray cannot be assumed square, teach four corner points P1 (origin), P2 (end of X row), P3 (far corner), P4 (end of Y column) and interpolate with normalized parameters. Guard the divisions when a count equals 1:
u = (Nx > 1) ? col / (Nx - 1) : 0.0
v = (Ny > 1) ? row / (Ny - 1) : 0.0
P = (1-u)*(1-v)*P1 + u*(1-v)*P2 + u*v*P3 + (1-u)*v*P4
P.z = P.z + layer * pitchZ
This bilinear form absorbs small rotations and non-parallel sides of the pallet without requiring a perfectly aligned fixture. Orientation (rotation of the TCP) is normally held constant from the reference pose - interpolating orientation across corners is rarely wanted and can produce wrist flips.
Step-by-Step Implementation
Prerequisites
- TCP correctly defined and payload/CoG entered for the gripper plus the heaviest part. Pattern math is exact; a wrong TCP shifts every computed point.
- A taught, verified pick pose with clean approach and retract vectors.
- Physical pallet/tray located repeatably (hard stops, dowel pins, or a vision offset). Computed patterns assume the fixture returns to the same place.
- Measured pitches. Do not trust the drawing - measure pocket-to-pocket centres on the actual tray and account for stack-up across the full run, not just one pitch.
Procedure
- Define the pallet frame/feature. Create a coordinate feature aligned with the tray so that +X runs along columns and +Y along rows. All offsets are applied in this frame.
- Teach the reference pose. Jog to position index 0 with a part actually in the gripper and the part fully seated. Record it as the pattern origin.
- Teach the remaining corner(s) if using interpolation, or enter the pitches if using pure grid math.
- Create the loop. Structure the body as: move to approach (place pose offset by a clearance in pallet -Z, typically 25-75 mm depending on part height and interference), linear move down to place, open gripper, dwell for the gripper's stated actuation time, linear retract to approach, then move to the pick pose via a safe transit waypoint.
- Derive approach and retract from the computed pose, never from a separately taught fixed point. If the approach is a fixed waypoint while the place point moves, the vertical entry vector tilts and the part will drag on pocket walls at the far end of the pattern.
- Increment and store the index only after a successful place (gripper open confirmed, part-present sensor cleared). Storing before the move causes a skipped pocket after a fault.
-
Test the pattern boundary. When
ireachesNx*Ny*Nz, stop the loop, signal "pallet full" to the PLC/HMI, and resetito 0 only on an explicit operator or PLC acknowledge - never automatically.
Interfacing With a PLC or HMI
For format changes and traceability, keep the robot dumb and the recipe in the controller. A minimal exchange over the robot's fieldbus (EtherNet/IP, PROFINET, Modbus TCP - whichever the controller supports) looks like this:
| Direction | Data | Type | Purpose |
|---|---|---|---|
| PLC to robot | Nx, Ny, Nz | INT | Pattern counts for the current recipe |
| PLC to robot | pitchX, pitchY, pitchZ | REAL (mm) | Pocket pitches / layer height |
| PLC to robot | Start index | INT | Resume onto a partially filled pallet |
| PLC to robot | Skip mask or skip count | DWORD / INT | Bypass damaged pockets or short-fill last layer |
| Robot to PLC | Current index, row, col, layer | INT | HMI display and traceability |
| Robot to PLC | Pallet full / cycle complete | BOOL | Discharge conveyor or operator call |
Verification and Commissioning
- Dry-run at reduced speed with no part. Step the index manually to the four extreme corners (0, Nx-1, Nx*(Ny-1), Nx*Ny-1) of the bottom layer and the top layer. These are where reach, singularity and wrist-flip problems appear first.
- Check joint configuration continuity. Confirm the arm does not change elbow/wrist configuration part-way through a row. If it does, add an intermediate joint-space waypoint or rotate the pallet frame so the whole pattern stays in one configuration.
- Measure real placements. Place actual parts in indices 0, mid-pattern and last, then measure centre-to-centre with calipers. Cumulative pitch error over 6 columns is the usual culprit for the last pocket missing.
- Verify the top layer clearance. Approach height must clear the tallest already-placed part, plus gripper fingers, plus any interleave sheet.
- Fault-recovery test. E-stop mid-place, release, and resume. Confirm the robot returns to the same index rather than skipping or repeating. Repeat with a full controller power cycle to prove index retention.
- Boundary test. Force the index to the final value and confirm the pattern-complete handshake fires and the loop does not roll over into an off-pallet coordinate.
- Speed ramp. Only after geometry is proven, raise speed/acceleration in steps and re-check part seating - inertia at the retract can lift or tip a freshly placed part.
Common Failure Modes
| Symptom | Likely cause | Fix |
|---|---|---|
| Pattern drifts diagonally across the tray | Offsets applied in base frame instead of pallet frame | Apply translation in the taught pallet feature/frame |
| Last column/row misses by a few mm | Pitch taken from drawing, not measured; tolerance stack-up | Use 4-corner interpolation or measure end-to-end and divide |
| Parts dragged on pocket walls at far corners | Fixed approach waypoint with moving place point | Compute approach as place pose + clearance along pallet -Z |
| Pocket skipped after a fault | Index incremented before place completed | Increment after gripper-open/part-clear confirmation |
| Index lost on power cycle | Counter held in volatile variable | Store index in retentive memory or mirror it to the PLC |
| Reach or singularity fault at one corner only | Pattern extends beyond comfortable workspace | Reposition pallet/robot, or split into two patterns |
| Wrist flip mid-row | Configuration change between adjacent points | Add joint-space transit waypoint; keep constant TCP orientation |
When a Wizard Is Not Enough
Move to computed offsets when any of these apply: multiple product formats share one cell; the last layer is routinely short-filled; pockets must be skipped based on an inspection result; the pallet position is corrected by vision each cycle; or the pattern is not a rectangular grid (circular, staggered/brick-bond, or nested layouts). Staggered layouts in particular are simple in code - offset alternate rows by half a pitch:
IF (row mod 2) = 1 THEN
dX = col * pitchX + (pitchX / 2.0)
END_IF
For circular patterns, replace the Cartesian grid with polar math and rotate the TCP about the pallet Z axis by the same angle if the part must stay radially aligned - but confirm the added rotation does not exceed the wrist joint range at the extremes.
FAQ
Do I have to teach every place position for a pick and place with multiple drop points?
No. Teach one reference pose (plus corner points if the tray is not square) and generate the rest either with the controller's pattern/palletizing wizard or by adding a computed X/Y/Z offset derived from an index counter. A 6 x 4 x 3 pattern then needs 1-4 taught poses instead of 72.
How do I convert a single counter into row, column and layer?
With zero-based index i: col = i mod Nx, row = (i div Nx) mod Ny, layer = i div (Nx*Ny). Multiply each by its pitch to get the offset, and apply that offset in the pallet coordinate frame.
Why does my pattern skew as it fills, even though the first row is correct?
The offsets are almost certainly being applied in the robot base frame while the tray sits at a slight angle. Define a coordinate feature aligned to the tray and apply all translations in that frame, or use four-corner bilinear interpolation to absorb the misalignment.
How do I resume a partially filled pallet after an E-stop or power cycle?
Store the position index in retentive memory or mirror it to the PLC every cycle, and increment it only after the place is confirmed complete. On restart, accept a start-index from the HMI so an operator can also resume onto a manually partial pallet.
Should approach and retract points be taught separately from the place point?
No. Compute them from the current place pose by adding a clearance along the pallet Z axis. A fixed taught approach with a moving place point produces an increasingly angled entry vector and drags parts on pocket walls at the far end of the pattern.