Teach pendant programming
Using Position Registers
Position registers (PR) are general-purpose variables that hold full position data (x, y, z, w, p, r), and a FANUC controller provides one hundred of them. This guide covers recording, editing, and calculating positions on the DATA Position Reg screen, then referencing them in motion and offset instructions. Depth comes from the register-math and offset behavior that lets one taught point drive many derived positions.
- Step 1.
Decide what the register must hold
Determine whether the application needs a fixed reusable pose, a calculated offset, or a pattern such as a pallet grid. A position register holds an entire pose (x, y, z, w, p, r), while a numeric register (R) holds only a single integer or fraction. Pick the position register when the whole target point has to vary at run time.
- Step 2.
Open the position register screen
Press MENU, then 0 NEXT, then 3 DATA, or simply press the DATA key. Press F1 [TYPE] to open the screen change menu and select Position Reg. The DATA Position Reg screen lists PR[1] through PR[100] with the function keys MOVE_TO, RECORD, POSITION, and CLEAR.
- Step 3.
Read the R and asterisk status markers
On the list, an "R" to the right of a register means it already holds a taught or loaded value. An asterisk (*) means the register is empty and uninitialized. Confirm the marker before you reference any register in a program, because an uninitialized register has no valid destination.
- Step 4.
Comment each register you use
Move the cursor to a position register number field and press ENTER, then select a character input method and type a clear name such as REF POSITION. Press ENTER to store the comment. Well-labeled registers let the next technician read intent straight from the screen and the program.
- Step 5.
Record the current robot position
Jog the robot to the pose you want to capture, move the cursor to the target PR field, then hold SHIFT and press F3 RECORD. The marker changes from asterisk to R once the pose is stored. In a multi-motion-group system, recording a position register captures the position data for all axes regardless of the current motion group.
Caution: Keep clear of the robot envelope while jogging and recording, and work at reduced speed with the deadman held. Confirm the tool and any fixtures are clear before you move to the capture pose.
- Step 6.
Inspect and edit the position detail
With the cursor on a register, press F4 POSITION to open the position detail screen. It shows the user frame (UF), tool frame (UT), and configuration (CONF), plus the X, Y, Z, W, P, and R values. Move the cursor to any field and key in a new value to adjust the stored pose numerically.
- Step 7.
Choose the storage form
On the position detail screen, press F5 [REPRE] and select the representation: 1 Cartesian or 2 Joint. Cartesian storage records x, y, z, w, p, r; Joint storage records J1 through J6. Press F2 PAGE to view any additional axes such as E1, E2, and E3 on a subgroup.
- Step 8.
Set the configuration when needed
For a Cartesian pose, press F3 CONF on the position detail screen to set joint placement. Move the cursor to a field and change Flip or Non-flip with the up and down keys. Press F4 DONE when the configuration is correct so the controller resolves the pose the way you intend.
- Step 9.
Load a position from within a program
Use a position register instruction such as PR[i] = (value) to write a pose at run time. The value can be another PR[i], a taught P[i], Lpos for the current Cartesian position, Jpos for the current joint position, UFRAME[i], or UTOOL[i]. For example, PR[1] = Lpos captures wherever the tool currently is.
- Step 10.
Calculate offsets with register math
Add or subtract poses to derive new positions, for example PR[3] = PR[3] + Lpos to accumulate a shift. The instruction PR[i] = (value) + (value) loads a sum and PR[i] = (value) - (value) loads a difference. This is how one base point plus a computed increment produces a pallet or index pattern.
- Step 11.
Edit a single axis element
A position register axis instruction addresses one element as PR[i,j], where j is 1=X, 2=Y, 3=Z, 4=W, 5=P, 6=R in Cartesian form or 1=J1 through 6=J6 in joint form. You can load, add, subtract, multiply, divide, or take MOD and DIV, for example PR[3,6] = R[10] or PR[4,3] = 324.5. Editing one element leaves the rest of the pose untouched.
- Step 12.
Reference the register in a motion instruction
Replace a fixed taught point with the register in a move line, for example J PR[1] 100% FINE or L PR[3] 1000mm/sec CNT100. The robot then goes wherever the register currently points. This is the core benefit: the motion line stays the same while the destination varies.
- Step 13.
Apply an offset with OFFSET CONDITION
Place OFFSET CONDITION PR[1] before the motion line, then add the Offset option to the move, for example L P[2] 500mm/sec FINE Offset. The register supplies the shift direction and amount, and for a Cartesian shift the active user frame decides the offset unless you specify one; the UT and CONF values are ignored. You can also shift directly with L P[2] 500mm/sec FINE Offset, PR[1].
Caution: When you teach a point that carries the Offset option, the pendant prompts "Subtract offset data from current pos?" and teaches the position minus the offset if you answer Yes. Understand which frame the offset uses before answering, because a wrong frame moves the whole pattern.
- Step 14.
Verify the calculated move in test mode
Run the program in test mode at low speed and single step through the register-driven and offset lines. Confirm the robot reaches each calculated pose where you expect it. Raise speed only after every derived position checks out.
Caution: A math error or a wrong frame can send the robot to an unexpected location, so keep everyone outside the envelope during the first dry run. Verify at reduced speed with the deadman held before any production-speed cycle.
- Step 15.
Protect registers in multi-task programs
When a background or parallel task writes a register that a running motion uses as its target, bracket the motion with LOCK PREG before the move and UNLOCK PREG after it. This blocks all tasks from rewriting the value while the line executes. If a task tries to rewrite a locked register, the controller raises an error and pauses the program.
Caution: Overwriting the register that holds the current motion target can drive the robot to an unexpected position. Use I/O handshaking so a task confirms its register calculation finished before the motion line runs.
- Step 16.
What can go wrong: the register shows an asterisk
An asterisk means the register is uninitialized, and adding the INC option to a taught position also leaves the data uninitialized. Referencing an empty register gives the move no valid destination, and with an uninitialized offset register the controller teaches or holds at the current position instead of shifting. Record a pose with SHIFT and F3 RECORD, or load one from the program, before the register is used.
- Step 17.
What can go wrong: a Cartesian offset lands in the wrong place
A Cartesian position register is interpreted in the active user frame, so if the wrong user frame is selected the shift comes out rotated or displaced. Open F4 POSITION and confirm the UF value on the register, and check which user frame the program has active at that line. Match the frame used for the offset to the frame the point was defined in.
- Step 18.
What can go wrong: someone edits a register value blind
Position registers are shared across the whole program, and the screen warns never to change a value before checking how the system uses it. A blind edit can silently move any motion line that references that register. Trace every use of the register first, then change the value and retest in test mode.
Common questions
- How long does Using Position Registers take?
- Using Position Registers is rated Intermediate and takes about 35 minutes across 18 steps.
- What tools do I need?
- You will need Teach pendant, Existing TP program with at least one taught position.
- What should I do before starting?
- Comfort jogging the robot in world and joint modes. A basic program with taught positions already exists. Familiarity with numeric registers (R) and math instructions.
- What is the first step?
- Decide what the register must hold. Determine whether the application needs a fixed reusable pose, a calculated offset, or a pattern such as a pallet grid. A position register holds an entire pose (x, y, z, w, p, r), while a numeric register (R) holds only a single integer or fraction. Pick the position register when the whole target point has to vary at run time.