liminfo

FANUC Reference

Free reference guide: FANUC Reference

31 results

About FANUC Reference

The FANUC Robot Programming Reference is a searchable guide covering 31 essential topics for FANUC industrial robot programming. The Motion Commands section details Joint (J) motion for fastest point-to-point moves, Linear (L) motion for straight-line TCP paths used in welding and dispensing, Circular (C) and Arc (A) motion for arc interpolation, FINE/CNT termination types controlling positioning accuracy versus corner blending (CNT0 to CNT100), and Offset/Tool_Offset for dynamic position adjustment using PR[] registers.

Data handling entries cover four register types: R[] numeric registers (up to 200) for arithmetic and counters, PR[] position registers (up to 100) for XYZ/WPRJ and Joint coordinate storage with per-element access (PR[1,3] for Z-axis), SR[] string registers for logging and communication, and AR[] argument registers for subprogram parameter passing. I/O commands include DO[]/DI[] digital I/O with PULSE and TIMEOUT options, RO[]/RI[] robot internal I/O, GO[]/GI[] group I/O for multi-bit integer transfer, and AO[]/AI[] analog I/O supporting 0-10V and 4-20mA signals.

The reference also covers program flow control (IF/JMP, SELECT multi-branch, FOR loops, CALL synchronous and RUN asynchronous subprogram calls, WAIT with conditions and timeouts), coordinate frame management (UFRAME user frames for fixtures, UTOOL tool frames for TCP definition, JPOS/LPOS/CURPOS position reading), KAREL advanced programming (Pascal-like syntax with GET_POS_REG/SET_POS_REG, DOUT/DIN/AOUT/AIN, file I/O), and common error codes including SRVO-001 (E-stop), SRVO-023 (overload), MOTN-018 (unreachable position), and INTP-127 (singularity).

Key Features

  • Motion command reference: J (joint), L (linear at mm/sec), C (circular via-point), A (arc weld), with FINE exact positioning and CNT0-100 corner blending
  • Four register types: R[] numeric (200 max, arithmetic/counters), PR[] position (100 max, XYZ/Joint with per-element PR[n,axis] access), SR[] string, AR[] argument
  • Complete I/O reference: DO[]/DI[] digital with PULSE and TIMEOUT, RO[]/RI[] robot internal, GO[]/GI[] group integer transfer, AO[]/AI[] analog 0-10V/4-20mA
  • Program flow: IF/JMP conditional branching, SELECT multi-branch (switch-case), FOR loops, CALL (synchronous) and RUN (asynchronous) subprogram execution
  • Coordinate frame setup: UFRAME[] user frames with 3-point teaching, UTOOL[] tool frames with 6-point TCP calibration, JPOS/LPOS/CURPOS position readers
  • KAREL programming: Pascal-like PROGRAM structure, GET_POS_REG/SET_POS_REG for PR[] access, DOUT/DIN/AOUT/AIN I/O control, OPEN FILE/READ/WRITE for data logging
  • Offset and Tool_Offset motion modifiers using PR[] for dynamic position calculation and VOFFSET with VR[] for vision-guided adjustments
  • Error code troubleshooting: SRVO-001 (E-stop release and reset), SRVO-023 (payload check, collision inspection), MOTN-018 (reachability, frame verification), INTP-127 (singularity avoidance)

Frequently Asked Questions

What FANUC programming topics does this reference cover?

It covers seven categories: Motion Commands (J, L, C, A motion types with FINE/CNT termination and offsets), Registers (R[], PR[], SR[], AR[]), I/O Commands (digital, robot, group, analog), Program Flow (IF/JMP, SELECT, FOR, CALL/RUN, WAIT), Coordinate Frames (UFRAME, UTOOL, position reading), KAREL advanced programming, and common Error Codes.

What is the difference between J and L motion commands?

J (Joint) motion moves each axis independently to the target, making it the fastest option but with an unpredictable curved path. L (Linear) motion drives the TCP along a straight line at a specified speed in mm/sec, which is essential for welding, dispensing, palletizing edges, and any operation requiring controlled path geometry.

How do FINE and CNT termination types work?

FINE requires the robot to reach the exact target position before executing the next instruction, providing maximum accuracy. CNT0 through CNT100 enable corner blending where CNT0 is nearly exact and CNT100 creates maximum path rounding. CNT reduces cycle time by avoiding deceleration/acceleration at each point but sacrifices positional precision.

How do I use position registers for dynamic offset?

Store the current TCP position with PR[1] = LPOS, modify individual axes with PR[1,3] = PR[1,3] + 50 (add 50mm to Z), then use the offset in motion: L P[1] 500mm/sec FINE Offset,PR[1]. Tool_Offset,PR[2] applies offset in the tool coordinate frame. This is essential for pallet patterns and vision-guided pick-and-place.

What is the difference between CALL and RUN for subprograms?

CALL executes the subprogram synchronously, meaning the calling program waits until it completes before continuing. RUN executes the subprogram asynchronously in parallel, allowing both programs to run simultaneously. Use WAIT R[50] = 1 to synchronize when the RUN subprogram finishes. CALL also supports argument passing: CALL WELD_SEQ(1,100) passes values to AR[1] and AR[2].

How do I set up UFRAME and UTOOL coordinate frames?

For UFRAME (user frame), use 3-point teaching: define origin, X-direction, and Y-direction points on the work surface via SETUP > Frames > User Frame. Activate with UFRAME_NUM = 1. For UTOOL (tool frame), use 6-point or 3-point TCP calibration to define the tool tip location via SETUP > Frames > Tool Frame. Activate with UTOOL_NUM = 1.

What KAREL capabilities are available for advanced programming?

KAREL is a Pascal-like language offering structured programming beyond TP programs. Key features include XYZWPR position variables, GET_POS_REG/SET_POS_REG for reading/writing PR[] registers with status checking, DOUT/DIN/AOUT/AIN direct I/O control, and file I/O (OPEN FILE, READ, WRITE, CLOSE FILE) for data logging, configuration files, and external communication.

How do I resolve common FANUC error codes?

SRVO-001 (E-stop): release the emergency stop button by turning clockwise, press RESET on the teach pendant, then turn servo power ON. SRVO-023 (overload): check payload settings in SETUP > Motion and inspect for collisions. MOTN-018 (unreachable): verify target coordinates, UTOOL/UFRAME settings, and axis limits. INTP-127 (singularity): use J motion to bypass the singularity point, add via-points with CNT, or set $SINGULARITY_AVOIDANCE = 1.