Teach pendant programming
Editing a Program Online Safely
A field procedure for changing a TP program that lives on a robot in or near production, using the FANUC teach pendant edit screen, the three-mode switch, and step testing so a small change cannot become an unplanned motion. It leans on the fact that the controller can run a program the instant you edit it, so the workflow keeps starts blocked and speed limited until you have verified the change. Every menu path and field here comes from the R-30iB operator's manual.
- Step 1.
Bring the robot to a clean stop first
Let the current cycle reach a known line, then press HOLD so the program is paused rather than aborted partway through a move. Confirm the robot is stopped before you open anything for edit. Editing a program that is still executing is the core hazard this guide exists to prevent.
Caution: Never open a program for edit while it is actively running or while anyone is inside the safeguarded space.
- Step 2.
Back up the current program before editing
Export a copy of the program to USB or a network share so the prior version can be restored if the edit misbehaves. A single-program export is enough for a one-line change; a full backup is better before larger edits. Keep the copy until the change has run clean in production.
- Step 3.
Set the three-mode switch to T1
T1 is the test mode where tool center point and flange speed are both held to 250 mm/sec or slower, so a wrong move stays slow. When you set the switch and remove the key, the mode is fixed to T1. In AUTO you cannot start a program from the pendant at all, which is why editing and testing happen in T1.
Caution: Do not switch between T1 and AUTO while the deadman switch is held, or a system error occurs; release the deadman, then grip it again.
- Step 4.
Select the program on the pendant
Press MENU and choose SELECT (or press the SELECT key) to open the program selection screen, move the cursor to the program name, and press ENTER to open the edit screen. With the teach pendant enabled, selecting a program forcibly terminates any current or halted program, so make sure the robot is already stopped. With the pendant disabled, you cannot select another program while one is running or halted.
- Step 5.
Block teach-pendant starts while you edit
Press FCTN and select Disable FWD/BWD; the letters FBD appear reversed in the top right corner, meaning Forward and Backward are disabled. This exists because the controller can execute the program the moment you edit it, and this setting stops an accidental SHIFT plus FWD from launching motion. Select Disable FWD/BWD again to release it when you are ready to test.
- Step 6.
Make only the intended edit
Move the cursor to the exact line and change only the instructions your written change calls for, leaving unrelated lines alone. To change an instruction item such as motion type, speed, or termination, press F4 [CHOICE] and pick from the pop-up menu. Changing the motion type also switches the feed-rate unit automatically, so recheck the speed value after.
- Step 7.
Re-teach a position with TOUCHUP when the point moved
Put the cursor on the motion line, jog the robot to the new position in T1, then hold SHIFT and press F5 TOUCHUP to record it into that position variable. If Confirmation of TOUCHUP is enabled in the system config menu, answer the Are you sure prompt. For a numeric tweak instead, press F5 POSITION to open the position detail screen and edit X, Y, Z, W, P, R directly, then press F4 DONE.
Caution: Jog only at reduced speed with the deadman gripped, and keep clear of the tool path before you press TOUCHUP.
- Step 8.
Use EDCMD for structural edits
Press NEXT to reveal F5 [EDCMD], then choose Insert, Delete, Copy, Find, Replace, Renumber, Comment, Undo, or Remark. Insert adds a set number of blank lines and renumbers the program; Copy records a line range in memory that you paste elsewhere. Find and Replace are how you retarget a signal cleanly, for example changing DO[1] to DO[2] everywhere after an I/O reallocation.
- Step 9.
Prefer Remark over Delete for a reversible change
Remark tags a line so it is skipped at execution and shows // at the head of the line, and because the data is saved you can unremark it and run it immediately. This gives you a safe way to disable a step during testing without losing it. Multiple lines can be remarked at once.
Caution: A remarked motion line cannot be re-taught with TOUCHUP; unremark it first if you need to update the position.
- Step 10.
Undo a mistaken edit while still on the line
EDCMD Undo cancels edits such as an instruction change, a line insertion, or a line deletion and returns the line to its prior state. If you undo an instruction you just taught into a blank or last line, that taught instruction is removed. A second Undo restores the state from before the first Undo.
- Step 11.
Renumber positions after inserts and deletes
Repeated inserts and deletes leave position numbers out of order, since every newly taught motion gets the next number regardless of where it sits. Run EDCMD Renumber to arrange the position numbers in ascending order down the program. Do this before you review so the printout reads cleanly.
- Step 12.
Read back the edited section
Scroll through the changed lines and confirm each one matches your written change with no stray typo, wrong register, or flipped I/O state. Colored edit display, where I/O ON shows green and OFF shows red, makes a wrong signal state easier to catch. Confirm speeds and termination types (FINE versus CNT) on any motion line you touched.
- Step 13.
Set up the test cycle
Press MENU and choose TEST CYCLE, then set Step statement type to STATEMENT so execution pauses at each line, or MOTION to pause only at motion instructions. Group Motion ENABLE or DISABLE controls whether the robot actually moves, and Digital/Analog I/O ENABLE or DISABLE controls whether real I/O is exchanged with peripherals. These settings let you rehearse logic before you rehearse motion.
- Step 14.
Dry-run the logic with the robot locked
Set Group Motion to DISABLE (robot lock) and step the program to check instruction flow and I/O with no arm movement; all I/O carries the simulated flag while disabled. This catches jump, wait, and register errors safely. Set Group Motion back to ENABLE for the motion test, which returns I/O to its real state.
Caution: Even with the robot locked, the emergency stop still applies and the arm will not move; do not treat lock as a substitute for keeping clear.
- Step 15.
Step the edited lines forward at low speed
Press STEP so the STEP LED lights, move the cursor to the start line, grip the deadman, enable the pendant, then hold SHIFT and press FWD to run one line at a time. Keep SHIFT held until the line finishes; releasing SHIFT or the deadman, or pressing HOLD, stops the robot. On a motion line the cursor stays put; on a logic line it advances.
Caution: Stepping starts real motion that can surprise you, so confirm the work area is clear and the fence is sound before the first SHIFT plus FWD.
- Step 16.
Use backward step to back out of a move
Hold SHIFT and press BWD to run motion lines in reverse, which is useful for walking the tool back off a fixture after a step. Only motion instructions run in reverse; skip, time-before, time-after, and incremental options are ignored or blocked. A PAUSE, ABORT, END, JMP, or UALM line stops backward execution from crossing it.
- Step 17.
Run a continuous low-speed pass, then hand back
With the change verified line by line, run a continuous test in T1 at low override to watch the whole edited section flow. Only when that is clean, re-enable FWD/BWD, return the three-mode switch to AUTO, and restore production override. Notify the affected shift and update the program revision log so the change is traceable.
- Step 18.
What can go wrong: the robot moves the instant you edit
The controller can execute a program immediately while it is being edited, so an accidental SHIFT plus FWD during teaching launches motion. Keep Disable FWD/BWD active (FBD showing) until you deliberately start testing. When you release FBD, the override drops to the safe FWD-enable value set in the system, so raise it consciously.
- Step 19.
What can go wrong: motion is slower than the taught speed
In T1 the tool center point and flange are capped at 250 mm/sec even at 100% override, so a line taught at 300 mm/sec runs at 250 and a warning about the T1 speed limit may appear. This is expected in test mode and is not a fault. To see true path and cycle time you must use T2 with the fence and deadman managed per the safety handbook, which is a separate, more hazardous check.
- Step 20.
What can go wrong: an edit you cannot take back
A deleted instruction is not restored, and a TOUCHUP overwrites the old position with no recovery, so a slip here loses data. Confirm the exact line before you delete, and lean on Remark when you only want a step disabled. Your pre-edit backup is the real safety net if a position is lost.
Caution: Verify the cursor is on the correct line before answering YES to Delete line(s).
- Step 21.
What can go wrong: positions out of order or memory full
After many inserts and deletes the position numbers no longer run in sequence; Renumber fixes the order. If a remark or edit fails with a memory-full message, free up teach-pendant program memory by deleting unused programs, then retry. Renumber and tidy before you export the final version.
Common questions
- How long does Editing a Program Online Safely take?
- Editing a Program Online Safely is rated Intermediate and takes about 30 minutes across 21 steps.
- What tools do I need?
- You will need Teach pendant (iPendant), Three mode switch key, USB memory or network share for the program backup.
- What should I do before starting?
- The exact change is written down before you touch the pendant. The robot is at a known line and not mid-cycle. You know which positions, registers, or I/O the edit touches. A recent backup of the program or the controller exists.
- What is the first step?
- Bring the robot to a clean stop first. Let the current cycle reach a known line, then press HOLD so the program is paused rather than aborted partway through a move. Confirm the robot is stopped before you open anything for edit. Editing a program that is still executing is the core hazard this guide exists to prevent.