CalWest ManufacturingRobotics Fontana, CA

Call or text (818) 397-4809

How to set up a FANUC user frame, and what moves when it changes

Why user frames make programs easier to support, how the three point and four point methods work on R-30iB and R-30iB Plus controllers, and what a re-taught frame does to the points already in a program.

A FANUC user frame is a coordinate system laid on the work: a fixture, a pallet station, a table or a conveyor section. Points taught in it are stored relative to that work instead of to the robot, so when the fixture moves, re-teaching one frame brings every point with it. This guide covers why user frames are worth setting up, the three point and four point methods, how programs select a frame, and what happens to taught points when a frame changes.

In short

To set up a FANUC user frame on an R-30iB, open MENU, SETUP, Frames, press F3 OTHER and pick User Frame. Choose a frame number, press DETAIL, then METHOD and Three Point. Touch the tool center point to the origin, a point along +X and a point in the X-Y plane, recording each with SHIFT and F5 RECORD. Press PREV, then F5 SETIND to make the frame active.

It follows FANUC’s operator’s manual for R-30iB and R-30iB Plus controllers (Basic Function, B-83284EN). Menus differ on older and newer controllers. Anyone teaching frames inside a cell should be trained on the robot and working to the plant’s own entry procedures, in T1 at low speed.

Why use a FANUC user frame?

Without user frames, every point is taught in the world frame, which is fixed to the robot’s base. That works until something in the cell moves. A fixture that gets bumped, a table that gets re-leveled or a pallet stand that gets bolted down an inch over means touching up every point by hand. FANUC’s Tech Transfer introduction to user frames makes the same case: re-touch the frame, not each point.

Work What the user frame sits on What it saves
Fixture or nest Machined edges or dowel holes on the fixture Re-teaching after the fixture is moved or replaced
Pallet station One corner of the pallet, X along the rows Offsets calculated along the pallet edges, not world axes
Second identical fixture The same features on the copy A program copied to the new frame, as FANUC’s Tech Transfer video shows
Fixed camera (iRVision) The offset frame chosen in the vision process Vision offsets calculated in a frame the robot and camera agree on
Angled table or chute Its surface, X along the slope Jogging and offsets that follow the surface

Jogging gets easier too. With USER selected on the COORD key, the jog keys move the tool along the fixture’s edges, not the robot’s axes. If that is all you need, a jog frame (JGFRM) does it without affecting any taught point.

Three point and four point methods

FANUC’s R-30iB manual lists three ways to define a user frame. Nine user frames are available as standard, numbered 1 to 9. Frame 0 is the world frame.

Method Points taught Use it when
Three Point Orient Origin Point (the origin), X Direction Point, Y Direction Point (a point in the X-Y plane) The origin is on a corner or edge you can touch, with X along that edge
Four Point A start point for a line parallel to X, a point along +X, a point in the X-Y plane, then the System Origin The origin you want is not on the edge that sets the X direction, such as the middle of a plate
Direct List X, Y, Z of the origin and W, P, R rotations, typed in relative to the world frame The frame’s values are known from a drawing, a calculation or a backup
  1. Open the frame list

    MENU, 6 SETUP, F1 TYPE, Frames. Press F3 OTHER and choose User Frame.

  2. Pick a frame and a method

    Cursor to a frame number, press F2 DETAIL, then F2 METHOD and Three Point (or Four Point). Add a comment that names the fixture.

  3. Record the points

    Jog the tool center point to each point, cursor to that line, and hold SHIFT while pressing F5 RECORD. Each line reads RECORDED, then USED once all are taught.

  4. Check the result

    SHIFT and F4 MOVE_TO sends the robot back to a recorded point. Press ENTER on a point to see its position data.

  5. Make it active

    Press PREV for the list, then F5 SETIND and the frame number. FANUC's manual is plain that a frame isn't effective until SETIND is pressed.

Getting an accurate user frame

A user frame is only as good as the tool center point that taught it. If the TCP is off, the frame is off with it, so set up the tool frame first and check it; our FANUC tool frame setup guide covers that. Many shops keep a pointed tool and its own tool frame just for teaching frames.

Spread the points as far apart as the fixture allows. A small touch error over a short X line tilts the frame much more than the same error over a long one. Touch features that will still be there after the fixture is rebuilt: machined edges, dowel holes, a corner block. Write down which features you used, so whoever re-teaches the frame later picks the same ones.

On 4- and 5-axis robots, FANUC’s manual warns that small touch errors can leave W and P slightly off zero, which can make points unreachable. It suggests correcting the rotation values through Direct List. After any frame is set, the manual says to save the settings to external storage. Frames live in the controller’s system files, and our FANUC robot backup guide covers which files hold them.

Yellow FANUC LR Mate robot on a black pedestal inside a guarded assembly table, reaching toward blue part nests on a round table, with orange molded parts in a chute in the foreground
Fig. 1LR Mate robot over the part nests at one of the three assembly tables we built for a plant in Temecula, CA. Nests and fixtures like these are what user frames are taught on.

How do programs select a user frame?

A program picks its frames with frame select instructions, found under Offset/Frames in the instruction menu. Put them at the top of each program, so a program never depends on what the last one left selected.

 1:  UFRAME_NUM=1
 2:  UTOOL_NUM=1
 3:J P[1:ABOVE NEST] 100% CNT50
 4:L P[2:NEST] 200mm/sec FINE
 5:  CALL GRIP_CLOSE
 6:L P[1:ABOVE NEST] 500mm/sec CNT50

Speeds and the gripper routine are placeholders. Each point records the user frame and tool frame it was taught in, shown as UF and UT on its position detail screen (F5 POSITION). On playback, if those numbers don’t match the frames selected, FANUC’s manual says the program is not executed and an alarm is posted. That check catches a program run with the wrong frame selected before the robot moves.

Position registers work differently. A Cartesian PR is stored with UF:F and UT:F, meaning it plays back in whichever frames are selected when the line runs, with no check. Our position registers guide covers why that matters.

A program can also change a frame’s definition with UFRAME[2]=PR[5], or read one with PR[5]=UFRAME[1]. That is how a frame gets built from a calculation or from data sent by a PLC. It changes the frame for every program that uses it, so treat it with the same care as re-teaching.

What happens to taught points when a user frame changes?

FANUC’s manual warns that if a tool or user frame is changed after teaching, the programmed points and ranges should be checked again, because the equipment could be damaged. What moves depends on how each position is stored.

Position Re-teach or edit user frame 1
P[ ] in Cartesian form, taught in UF 1 Moves with the frame. Same values, new place in the cell
P[ ] in joint form Doesn’t move
PR[ ] in Cartesian form Plays back in whatever frame is selected, so it moves if frame 1 is selected
PR[ ] in joint form Doesn’t move
Palletizing instruction points Taught in the world frame (UF 0), so not affected

When a fixture has moved and the frame is re-taught on the same features, that table is the whole point: the program follows the fixture. When a frame is re-taught on different features, or with a bad TCP, every point in it moves by the same error at once. Step the program through in T1 at low speed after any frame change, starting with the moves closest to the fixture.

A shifted frame can also put points out of reach or across a joint limit. The robot then stops partway with a limit error; our MOTN-017 guide explains why that happens.

Moving a program to a different frame (Frame Offset)

Sometimes points were taught in the wrong frame, or a program needs to move onto a new frame number. FANUC’s coordinate change shift function, under MENU, UTILITIES, Frame Offset, changes the user frame number in a program’s positions. It can convert the positions so the TCP lands in the same place in the cell, or keep the values and let the points move to the new frame. It leaves position registers alone, so check any PR the program uses by hand.

User frames with pallets, conveyors and vision

Pallets. FANUC’s palletizing instructions are taught in the world frame and can’t be shifted with a user frame. Palletizing done with position registers can, because the offsets are applied in a user frame on the pallet corner. Our palletizing programming guide compares the two.

Conveyors. A robot picking from a moving belt uses a tracking frame taught on the belt, which works like a user frame with X in the direction of travel. The iRPickTool line tracking guide covers the order those are taught in.

Vision. A fixed-camera iRVision process calculates offsets in an offset frame, usually a user frame, and the pick is taught in that same frame. FANUC’s Tech Transfer video on fixed frame offset stresses running the position registers in the proper frame. Re-teaching that frame means re-checking the vision setup, which our iRVision calibration guide covers.

How we set up frames on the cells we build

Paths on our cells are laid out and checked in FANUC ROBOGUIDE before they run on the real robot, and new motion is first stepped through slowly in T1 on the floor. When a simulated program is written against user frames on the fixtures, teaching those frames on the real hardware closes most of the gap between simulation and the cell, instead of touching up point by point. Our FANUC robot programming page covers how we write and tune robot programs, including on robots we didn’t build.

Common questions

What is the difference between a user frame and the world frame on a FANUC robot?
The world frame is fixed by the robot itself, with its origin set by the robot model, and it never changes. A user frame is a coordinate system you define on the work, such as a fixture corner or a pallet station, by its position and rotation in the world frame. User frame 0 is the world frame, so a program with no user frame selected works in world.
How many user frames does a FANUC robot have?
Nine as standard, numbered 1 to 9, plus frame 0 for the world frame. FANUC's R-30iB manual describes raising the count at a controlled start with the system variable $SCR.$MAXNUMUFRAM, up to 61 on R-30iB and R-30iB Mate and 253 on R-30iB Plus. Programs saved on an R-30iB Plus set above 61 can't be loaded onto an R-30iB or R-30iB Mate.
What happens to my points if I re-teach a user frame?
Every Cartesian point taught in that frame moves with it, because the point is stored as a position relative to the frame. That is what you want when a fixture has moved and the frame is re-taught on the same features. It is a collision risk when the frame is re-taught on different features or with a bad tool frame. Points stored as joint angles do not move.
Why won't my program run after I changed the active user frame?
Each Cartesian point records the user frame and tool frame numbers it was taught in. If the frame selected when the point plays back is a different number, FANUC's manual says the program is not executed and an alarm is posted. Put UFRAME_NUM and UTOOL_NUM lines at the top of the program, or check the point's detail screen to see which frame it expects.
Should I use the three point or the four point method?
Use three point when the frame's origin sits on an edge you can touch, such as a fixture corner, with the X axis running along that edge. Use four point when the origin you want is somewhere else, such as the middle of a plate, but there is a good straight edge to set the X direction. The four point method teaches the origin as a separate fourth point.

Sources

  1. FANUC America: Robot support and manuals (R-30iB/R-30iB Plus Operator's Manual, Basic Function, B-83284EN: 3.9.2 Setting a User Coordinate System, 4.3.2 Position Data, 4.13 Frame Instructions, 9.3 Coordinate System Change Shift Functions; via the Customer Resource Center)
  2. FANUC Tech Transfer: Introduction to User Frames
  3. FANUC Tech Transfer: Copying a Program to a User Frame
  4. FANUC Tech Transfer: iRVision Fixed Frame Offset

Start a project

Bring us the process. We'll bring the cell.

Send a phone video of the manual process, or a part drawing, by text or email. We come back with a cell concept and a plan: robot, tooling, controls and code.

Call or text
Call or text
(818) 397-4809
Email
sales@calwestmfg.com
Shop
13815 Arrow Rte, Fontana, CA 92335
Hours
Mon–Fri 7:00am – 3:45pm

FANUC Authorized System Integrator (ASI). Part of CalWest Manufacturing, founded 2012: AS9100D and ISO 9001 certified, ITAR registered.