Why FANUC TP Works Differently Than KRL or RAPID
Anyone switching from KUKA KRL or ABB RAPID to FANUC needs to rethink their approach first. TP (Teach Pendant) is not a classic high-level language but a line-based command structure created directly on the teach pendant. Every line has a fixed number, motion commands reference position registers, and the logic looks confusing at first glance. Once you understand the structure, however, you benefit from a very robust platform that is extremely widespread in the automotive industry.
Basic Structure of a TP Program
A TP program consists of a header section (program attributes such as Group Mask, Motion Group) and a numbered block of lines. Every line is either a motion, a logic command, or an I/O access. Typical structure:
J P[1] 100% FINE– joint move to position 1 at 100% speed, exact approachL P[2] 500mm/sec CNT50– linear move at 500 mm/s, blending with tolerance 50DO[1]=ON– set digital outputWAIT DI[3]=ON– wait for digital input
The difference between FINE and CNT is critical for cycle time: FINE means the target point is reached exactly (full stop), while CNT allows the path to be blended, saving time but altering the actual trajectory.
Position Registers vs. Program Positions
FANUC distinguishes between positions stored directly in the program and position registers (P[1] to P[n] at program level, or PR[1] globally). For flexible applications - such as variable palletizing positions - you should work with global position registers that can be calculated via register offsets. This lets a single program line traverse an entire grid pattern without teaching a separate line for every position.
Common Beginner Programming Mistakes
1. Incorrect Use of CNT Values in Safety-Critical Areas
An excessively high CNT value near tool-change positions or gripping points causes collisions because the robot never actually reaches the target position exactly. Near parts or fixtures, always use FINE or a low CNT value (CNT1–CNT10).
2. Missing Error Handling on WAIT Commands
A WAIT DI[x]=ON without a timeout blocks the program indefinitely if the signal never arrives - for example due to a faulty sensor. Instead use WAIT DI[x]=ON TIMEOUT,LBL[10] to jump to an error-handling routine if needed.
3. Unclear Tool and User Coordinate Systems (UTOOL/UFRAME)
Many path errors occur because the wrong UTOOL or UFRAME is active. Before every motion sequence, the program should explicitly set UTOOL_NUM=1 and UFRAME_NUM=1 instead of relying on the last manually selected setting.
Structuring Registers, Macros and Subprograms Properly
Large TP programs quickly become confusing. Best practice is to split logic into clearly named subprograms (e.g. PICK_PART, PLACE_PART, HOME_POS) and use registers (R[1]–R[n]) for counters and states. Macros are well suited for recurring safety routines such as tool-change verification.
Integrating iRVision Without Detours
FANUC robots with the iRVision option require a cleanly calibrated vision tool coordinate system for image-processing integration. A common mistake: calibration is performed with a different gripper than the one used in production, causing systematic offset errors. Always calibrate with the final tool and repeat calibration after every gripper change.
Conclusion
FANUC TP looks less elegant at first glance than modern robot programming languages, but in practice offers an extremely stable, industry-proven foundation. Using position registers consistently, setting CNT values deliberately, and never skipping error handling results in robust applications that run reliably for years.