Skip to main content
Skip to main content
FANUC robot position registers and frames
FANUC

FANUC Position Registers: Master PR and UF Offsets

Xpert Robotics Engineering Team9 min read

A deep dive into FANUC Position Registers (PR), User Frames (UF), and Tool Frames (UT). Learn how to use PR offsets for flexible palletizing, pallet stacking, and multi-fixture cells.

Position Registers (PR) are one of the most powerful features in FANUC TP — and one of the most underused. While P[] positions are taught and fixed, PR[] positions can be computed, modified, and offset at runtime. Mastering PR turns a rigid pick-and-place into a flexible multi-recipe cell.

P[] vs PR[] — Key Differences

Comparison:

  • P[n] — taught position, fixed in the program, visible only in that program
  • PR[n] — global position register, readable/writable from any program, modifiable at runtime
  • PR[n,1..9] — access individual elements: X, Y, Z, W, P, R, E1, E2, E3
  • PR[] can be computed from other PR[], from R[] numeric registers, or from Karel

Stack Height Calculation for Palletizing

The most common PR use case: calculating the Z offset for each layer of a pallet stack. Each layer adds one product height to the base pick position.

fanuc-tp
  1: PR[10]=P[3:PICK_BASE]    ;  ! Copy base pick to PR
  2: R[1]=R[5:LAYER]*R[9:HEIGHT] ; ! Compute Z offset
  3: PR[10,3]=R[1]              ;  ! Set Z element of PR
  4: L PR[10] 200mm/sec FINE    ;  ! Move to computed position
  5: DO[1:GRIPPER]=ON           ;

User Frames (UF) for Multi-Fixture Cells

A User Frame defines a coordinate system relative to a fixture or pallet in the world. Instead of teaching absolute positions per fixture, you teach positions relative to UF[1] for fixture 1, then switch to UF[2] for fixture 2 — same taught positions, different physical location.

fanuc-tp
  1: UFRAME_NUM=1              ;  ! Switch to User Frame 1
  2: L P[10:PICK] 300mm/s FINE ;
  3: UFRAME_NUM=2              ;  ! Switch to User Frame 2
  4: L P[10:PICK] 300mm/s FINE ;  ! Same P[10], different UF
💡

Always verify your User Frame calibration with a 3-point or 4-point calibration before production. A 1mm error in the UF origin becomes a 1mm position error on every motion using that frame.

Tool Frame (UT) Setup

The Tool Frame defines where the TCP (Tool Center Point) is relative to the robot flange. For a gripper, this is the center of the gripper fingers at close. Incorrect UT causes rotational motion to pivot around the wrong point, introducing position error on reorientation moves.

FANUC position registersFANUC PRFANUC user framerobot offset programmingFANUC palletizing registers