Robot Arm Simulator
Program a 6-axis industrial robot in 3D — Program • Kinematics • Explore • Practice • Quiz
Display Controls
Ten lessons that follow a first industrial-robotics course, each in its own cell with a live checklist. Choosing one loads its program into the editor: change it as you like and press Run. The Sandbox has every tool and instruction.
Saved in this browser only. Each save keeps every program, its points, the cell and any taught frames. Use Export workspace to keep a copy as a file.
1 Overview
A six-axis industrial robot arm in a 3D work cell, programmed from a teach pendant in a TP-style language, the way robots are programmed in industry and in a first robotics course. The arm is our own representative 6 kg, 900 mm-reach design, not any maker’s robot.
- Program (opens here): the cell, the pendant and the run controls. Ten lessons and a Sandbox, each with a live checklist.
- Kinematics: the same arm’s Denavit–Hartenberg table, forward and inverse kinematics (all eight solutions), the Jacobian, a singularity map and joint vs straight-line paths.
- Explore, Practice and Quiz: the ideas, generated problems and a shuffled quiz.
2 Getting Started
- Lesson 1 opens with a pointer tool. Open the Jog tab, pick JOINT and press and hold J1 +: an arrow shows which joint turns and which way. Every joint has its number on both sides of the arm. Save as point keeps where the tool is as the next P[n]; Add move here also writes the move into the program.
- Tick off the checklist above the cell. Each lesson loads its program into the Program tab. Press ▶ Run to run it, edit it as you like and run it again; your changes are saved. Restart loads the lesson program again.
- Open Lessons to choose any lesson or the Sandbox, in order. For a quick look at what the robot can do, pick a finished program from the Example list at the top of the Program tab (motion, frames, handling, dispensing, logic and safety) and press ▶ Run.
3 The Teach Pendant
- Program: the Example list loads one of 13 finished programs, each in its own cell. The Gripper list beside it, with a small drawing of each, changes what is on the flange in the Sandbox and the examples: pointer, cranked pointer, two-finger gripper, three-finger (centric) gripper, vacuum cup or glue nozzle. Every tool is bolted on through an adapter plate, and the gripper jaws ride on a guide in the gripper body. Changing it sets UTOOL 1 to the new gripper’s TCP; a part wider than the open jaws cannot be gripped. A lesson keeps the gripper it teaches. Below it is the program itself, always editable. Click in it and type; a line with a mistake turns red and the reason is shown under the editor. The buttons type a ready-made line below the cursor: a move to the current position (with a new point number), I/O, WAIT, IF, LBL, JMP, registers and CALL. A point you type that has no position yet (say
L P[7] 250mm/sec FINE) is taught where the arm is when you press Run. Touch-up stores the arm’s position into the point on the cursor’s line. While the program runs, the current line is highlighted and the editor is locked. - Jog: the four frames, a continuous or fixed step (10, 1, 0.1 mm or degrees), and the active UFRAME and UTOOL.
- Points: every P[n] of the program with its frame numbers and configuration. Edit the numbers, or move to a point.
- I/O: inputs (from the cell), outputs (force them by hand in T1/T2), and the cell’s gate and light curtain.
- Data: registers R[1]–R[20], position registers PR[1]–PR[10] and timers.
- Frames: UTOOL and UFRAME tables, with three-point teaching.
4 Running a Program
- T1 limits the tool to 250 mm/s; T2 runs at programmed speed; AUTO needs the gate closed (I/O tab). On a real robot T1 and T2 also need an enabling (hold-to-run) switch held: tick Real pendant in the Jog tab to practise with it. ▶ Run uses AUTO and closes the gate for you; pressing a jog key switches back to T1.
- STEP runs one line per FWD; BWD goes back to the previous point. HOLD stops the robot and turns red and blinks until you click it again to release it, RESET clears an alarm once its cause is gone, ABORT returns to line 1.
- The override scales every speed. The status box on the cell shows mode, program, line and state; a fault is explained in a red banner with its code.
5 The Language
- Motion:
J P[1] 50% FINE,L P[2] 250mm/sec CNT50,C P[3] P[4] 100mm/sec FINE, withOffset,PR[n]. - Frames:
UFRAME_NUM=1,UTOOL_NUM=2. I/O:DO[1]=ON,RO[1]=OFF,DO[5]=PULSE,0.5sec. - Data:
R[1]=R[1]+1,PR[1]=P[2],PR[1,3]=R[2]*40,PR[1]=LPOS. - Flow:
LBL[1],JMP LBL[1],IF R[1]<3,JMP LBL[1],IF DI[3]=ON,CALL REJECT,FOR R[1]=0 TO 2…ENDFOR,CALL NAME,END. - Waits and messages:
WAIT DI[3]=ON TIMEOUT,LBL[9](10 s),WAIT 0.5(sec),MESSAGE[text],UALM[1],PAUSE,ABORT,OVERRIDE=50%,TIMER[1]=START.
6 Kinematics Mode
Turn the joints with the sliders and watch the DH frames, the flange pose and the Jacobian follow. Enter a pose (or use the current one) and Solve to see every inverse-kinematics solution as a ghost arm; click one to move the arm there. Red ghosts are outside a joint limit. The ellipsoid at the flange shows how freely it can move: it flattens near a singularity.
7 Explore, Practice & Quiz
Explore has six groups of cards and a table translating the instructions into ABB RAPID, KUKA KRL and URScript. Practice draws problems on pallet offsets, registers, loops, speed and override, user frames, reach and forward kinematics; the answer is worked from the numbers printed. The quiz asks eight questions from a pool of twenty-four.
8 Tips
- Teach in T1 with a low override; check in T2; run in AUTO.
- Use FINE where the tool must be exact, CNT where it only passes by.
- If a linear move faults near J5 = 0°, tilt the tool a little or use a J move.
- The program and cell are saved in this browser. Export .ls saves a program file; Share link copies a link with your programs.
Industrial Robot Programming — a Free 6-Axis Robot Arm Simulator
Most robotics courses in community colleges and technical schools teach one skill above all: programming a six-axis arm from its teach pendant. Students jog the robot, store positions, and write short programs of moves, I/O and logic. On a real cell that time is scarce. This simulator gives the same work in a browser: a true-scale arm, a teach pendant, ten cells and a language that behaves like an industrial controller, faults included.
How a Robot Program Is Built
A program is a list of lines and a list of taught points. You jog the arm to a position and store it (P[1], P[2]…); each motion line moves to one of those points. Between the moves sit outputs that work the gripper or a machine, waits for sensors, and the logic that repeats and decides. Every point remembers the user frame and tool frame it was taught in and the arm’s configuration, so the robot comes back to it exactly the same way.
What a Teach Pendant Does
A teach pendant is the hand-held terminal wired to the robot controller. It has an emergency stop, an enabling (deadman) switch on the back that must be held at the middle position for the arm to move in manual, a mode selector for T1, T2 and AUTO, jog keys for each axis and a screen for editing programs. In this simulator the pendant panel on the right of the cell does the same jobs: the Jog tab moves the arm in joint, world, tool or user frame, the Points tab stores and touches up positions, the I/O and Data tabs show signals and registers, and Hold-to-run stands in for the enabling switch.
Motion Instructions: J, L and C, FINE and CNT
- J P[1] 50% FINE: a joint move. Every joint moves at once and arrives together; fast, but the tool path curves.
- L P[2] 250mm/sec CNT50: a linear move. The tool point travels in a straight line at the set speed.
- C P[3] P[4] 100mm/sec FINE: a circular move through a via point to an end point.
- FINE stops and settles on the point. CNT0–100 starts the next move early and rounds the corner: the robot keeps moving but never passes exactly through the point.
Frames: World, User and Tool
The world frame is fixed to the robot’s base. A tool frame moves the tool centre point (TCP) from the flange to the working tip; it is taught by touching one fixed point from three different orientations. A user frame is laid on a fixture by touching its origin, a point along +X and a point on the +Y side. Points taught in a user frame follow the fixture if it is moved and the frame re-taught.
The Ten Lessons
| # | Lesson | Cell | Instructions introduced |
|---|---|---|---|
| 1 | Jogging and frames | Three cones, pointer | (jogging only) |
| 2 | Teach and touch up points | Four cones, pointer | J, L, FINE, UFRAME_NUM, UTOOL_NUM |
| 3 | Tool frame and user frame | Pin and tilted fixture, cranked pointer | three-point teaching |
| 4 | Pick and place | Two nests, gripper | RO, RI, WAIT, CNT |
| 5 | Conveyor, sensor and counting | Conveyor and bin | DO, DI, R, IF, JMP, LBL |
| 6 | Palletising with offsets | Feeder and pallet, 3 × 4 × 2 | PR, Offset, FOR, ENDFOR |
| 7 | Machine tending with interlocks | CNC machine with door and vise | CALL, PULSE |
| 8 | Dispensing: circles, speed and CNT | Glue plate | C |
| 9 | Timeouts and error recovery | Late feeder | TIMEOUT, MESSAGE, END |
| 10 | Safety: AUTO, guarding and singularities | Guarded cell | (safe practice) |
A Complete Pick-and-Place Program
This is the reference answer to lesson 4, exactly as the pendant shows it. P[2] and P[4] are approach points above the two nests, so the moves down to the part are straight lines at a slow speed and end on FINE, and the gripper is only trusted once its sensor says so.
! Pick the part from nest A and place it on nest B
UFRAME_NUM=0
UTOOL_NUM=1
RO[1]=OFF
J P[1:Home] 50% FINE
J P[2] 80% CNT50
L P[3] 300mm/sec FINE
RO[1]=ON
WAIT RI[1]=ON
L P[2] 500mm/sec CNT50
J P[4] 80% CNT50
L P[5] 300mm/sec FINE
RO[1]=OFF
WAIT RI[2]=ON
L P[4] 500mm/sec CNT50
J P[1:Home] 50% FINE
Line by line: select user frame 0 and the gripper’s tool frame; open the gripper; go home; swing over nest A without stopping (CNT50); come straight down to the part and stop exactly; close the gripper (RO[1]) and wait for the part-present input (RI[1]); lift straight up, swing over nest B, come down, open and wait for fully-open (RI[2]); lift and go home.
Registers, Offsets and Palletising
A register R[n] holds a number; a position register PR[n] holds a position, and PR[n,1]…PR[n,3] are its X, Y and Z. Palletising uses one taught place point and an offset: for column c, row r and layer l, PR[1,1]=c×75, PR[1,2]=r×75, PR[1,3]=l×40, then L P[5] 400mm/sec FINE Offset,PR[1]. Three nested FOR loops fill a 3 × 4 × 2 pallet with 24 parts.
Safety: T1, T2 and AUTO
Under ISO 10218 and ANSI/RIA R15.06, manual reduced speed (T1) limits the tool to 250 mm/s and needs an enabling switch; this is where points are taught. T2 runs at programmed speed with the enabling switch. AUTO is for running with nobody in the cell: the guard gate and light curtain must be made. A program should also wait for its guards and its machines rather than assume them.
One Idea, Four Languages
Every maker’s language has the same parts. The simulator teaches them in a teach-pendant style; here is how the same instructions are written for three other controllers.
| Instruction | TP style (this simulator) | ABB RAPID | KUKA KRL | URScript |
|---|---|---|---|---|
| Joint move | J P[1] 50% FINE | MoveJ p1, v1000, fine, tool1; | PTP P1 | movej(p1, a=1.4, v=1.05) |
| Linear move | L P[2] 250mm/sec CNT50 | MoveL p2, v250, z50, tool1; | LIN P2 C_DIS | movel(p2, a=1.2, v=0.25, r=0.05) |
| Circular move | C P[3] P[4] 100mm/sec FINE | MoveC p3, p4, v100, fine, tool1; | CIRC P3, P4 | movec(p3, p4, a=1.2, v=0.1) |
| Digital output | DO[1]=ON | SetDO do1, 1; | $OUT[1]=TRUE | set_digital_out(1, True) |
| Wait for input | WAIT DI[3]=ON | WaitDI di3, 1; | WAIT FOR $IN[3] | while not get_digital_in(3): sync() end |
| Number register | R[1]=R[1]+1 | reg1 := reg1 + 1; | COUNT = COUNT + 1 | count = count + 1 |
| Call a routine | CALL OPEN_DOOR | OpenDoor; | OPEN_DOOR() | open_door() |
The Arm’s Kinematics
The simulated arm has an offset shoulder and a spherical wrist. Its standard Denavit–Hartenberg parameters (lengths in mm, angles in degrees) are below; the Kinematics mode shows the same table in modified (Craig) form and checks that both give the pose the arm is drawn in.
| Joint | θ | d | a | α | Limits |
|---|---|---|---|---|---|
| 1 | J1 | 330 | 50 | −90 | ±170° |
| 2 | J2 − 90 | 0 | 450 | 0 | −100° to 145° |
| 3 | −J3 | 0 | 35 | −90 | −70° to 200° |
| 4 | J4 | 400 | 0 | 90 | ±190° |
| 5 | −J5 | 0 | 0 | −90 | ±125° |
| 6 | J6 | 80 | 0 | 0 | ±360° |
Inverse kinematics splits in two: the wrist centre sits d₆ = 80 mm behind the flange along the tool axis, J1–J3 place it, and J4–J6 set the orientation. A pose can have up to eight solutions (wrist flip, elbow up or down, front or back); the configuration stored with each point picks one. At J5 = 0° the wrist is singular.
Worked Example: Inverse Kinematics of a 6-Axis Arm
Take the arm at J1–J6 = 30°, 20°, 10°, 0°, −60°, 0°. Forward kinematics puts the flange at X 546.7, Y 315.6, Z 642.7 mm with W, P, R = 180°, 20°, −150°. Inverse kinematics recovers the joints from that pose in four steps, using the table above.
| Step | Formula | Value |
|---|---|---|
| Wrist centre | flange − d₆ along the tool axis | (523.0, 302.0, 717.9) mm |
| J1 | atan2(y, x) | 30.0° |
| Reach r and height s | r = √(x² + y²) − a₁, s = z − d₁ | r = 553.9 mm, s = 387.9 mm |
| Forearm length L and angle β | L = √(a₃² + d₄²), β = atan2(a₃, d₄) | L = 401.5 mm, β = 5.0° |
| J3 (law of cosines) | sin(J3 + β) = (r² + s² − a₂² − L²) / (2 a₂ L) | 10.0° |
| J2 | atan2(r, s) − atan2(L cos(J3 + β), a₂ + L sin(J3 + β)) | 20.0° |
| J4, J5, J6 | from the rotation left after J1–J3 (R₀₃ᵀR) | 0°, −60°, 0° |
The same pose has eight solutions in all. Taking the other root of each step gives, for example, J1–J6 = 30°, 90°, 160°, 0°, −140°, 0° (elbow down) or −150°, −84.5°, 31.4°, 180°, −134.1°, 0° (reaching back over the base). In Kinematics mode, Solve IK draws all eight as ghost arms.
The Jacobian and Wrist Singularities
The Jacobian J relates joint speeds to tool speed, v = J·q̇. Where its determinant is zero the arm is singular: some tool motion needs infinite joint speed. On a spherical wrist this happens when J5 = 0°, because J4 and J6 then turn about the same line. For the pose above, |det J| falls with J5 exactly as |sin J5|:
| J5 | −90° | −60° | −30° | −10° | −1° | 0° |
|---|---|---|---|---|---|---|
| |det J|, % of the J5 = −90° value | 100.0 | 86.6 | 50.0 | 17.4 | 1.7 | 0.0 |
That is why a linear move through J5 = 0° stops with a singularity fault, and why programs keep J5 away from zero or cross it with a joint move. The Kinematics mode draws the manipulability ellipsoid and a map of it across the workspace.
Robot Simulator Software Compared
Industrial robot makers sell offline programming software that runs a copy of their controller. Those are the tools for real cells; this simulator is for learning the skill first, in a browser.
| This simulator | FANUC ROBOGUIDE | ABB RobotStudio | RoboDK | |
|---|---|---|---|---|
| Runs in | Any browser, no install | Installed software | Windows desktop, plus a cloud service | Desktop, plus a free web version |
| Cost | Free, no account | Paid licence; academic packages for schools | Basic features free; Premium paid (30-day trial) | Free web version; paid desktop licence |
| Robots | One representative 6-axis arm | FANUC robots | ABB robots | Hundreds of models from many makers |
| Language | TP-style teach-pendant programs | FANUC TP and KAREL | RAPID | Exports to many makers’ languages |
| Drives a real robot | No | Yes | Yes | Yes |
The skills carry over: jogging, frames, point teaching, FINE and CNT, I/O and interlocks work the same way on every controller. MechSimulator is not affiliated with FANUC, ABB or RoboDK; product names are trademarks of their owners.
Who Uses This Robot Simulator? A Virtual Lab for Robotics Courses
Robot time in a lab is short and shared. As a virtual lab the simulator lets every student jog, teach and run programs at home, and an instructor can set any of the ten lessons as homework.
- Community college and CTE students in industrial robotics, mechatronics and automation, practising pendant programming between lab sessions and before a robot operator credential.
- Instructors, to demonstrate frames, CNT, offsets and interlocks on a projector, and to set the lessons as homework.
- University students in an introductory robotics course, checking DH tables, inverse-kinematics solutions and Jacobians against a working arm.
- Technicians and engineers moving to robots from CNC or PLC work.
Frequently Asked Questions
How do you program an industrial robot arm?
With a teach pendant: you jog the arm to each position, store it as a point (P[1], P[2] …), and write motion instructions that move between the points, such as J P[1] 50% FINE (joint move) or L P[2] 250mm/sec CNT50 (straight-line move). Between the moves you add I/O (RO[1]=ON closes a gripper), waits (WAIT DI[3]=ON) and logic (registers, IF, JMP, CALL). You test it slowly in T1 with STEP on, then run it in AUTO.
What is the difference between FINE and CNT?
FINE makes the robot stop exactly on the point and settle before the next line. CNT (continuous, 0 to 100) lets the robot start the next move early and round the corner, so it keeps moving and never passes exactly through the point. Use FINE where the tool must be exact, such as gripping, placing or the start of a weld, and CNT on approach and clearance points.
What are T1, T2 and AUTO modes on a robot?
T1 is manual reduced speed: the tool is limited to 250 mm/s and the operator must hold an enabling (hold-to-run) switch; it is used for teaching. T2 is manual full speed, still with the enabling switch, to check a program at its real speed. AUTO runs with no one in the cell, so the guard gate must be closed and the light curtain clear (ISO 10218 and ANSI/RIA R15.06).
How many inverse kinematics solutions does a 6-axis robot have?
A typical 6-axis arm with a spherical wrist has up to eight solutions for one tool pose: the wrist flipped or not, the elbow up or down, and the arm in front of its base axis or reaching back over it. The robot stores which one it wants as the configuration of each taught point. At a singularity, such as joint 5 at 0 degrees, the solutions merge and some joints would need infinite speed.
What are DH parameters of a robot arm?
Denavit–Hartenberg (DH) parameters describe each link of a robot arm with four numbers: the joint angle θ, the offset d along the joint axis, the link length a and the twist α between neighbouring axes. Multiplying one 4×4 transform per joint gives the pose of the flange. For this simulator's arm the standard DH lengths are d1 = 330, a1 = 50, a2 = 450, a3 = 35, d4 = 400 and d6 = 80 mm.
What is a robot singularity?
A singularity is a pose where the robot's Jacobian loses rank, so some tool motion would need infinite joint speed. On a 6-axis arm with a spherical wrist the common one is the wrist singularity at joint 5 = 0°, where joints 4 and 6 line up. Controllers stop a linear move that passes through it, so programs keep joint 5 away from zero or cross it with a joint move.
Is this a free alternative to FANUC ROBOGUIDE or ABB RobotStudio?
For learning, yes: it is free, runs in a browser with no account, and teaches the teach-pendant skills those packages use (jogging, frames, points, FINE and CNT, I/O and interlocks) through ten graded lessons. It cannot drive a real robot or model a particular maker's arm; ROBOGUIDE, RobotStudio and RoboDK do that for production cells. MechSimulator is not affiliated with FANUC, ABB or RoboDK.
Explore Related Simulators
- CNC G-code Simulator: the machine the robot tends in lesson 7, programmed in G-code.
- PLC Ladder Logic Simulator: the controller that usually runs the cell around a robot.
- Electro-Pneumatic Circuit Simulator: solenoid valves and cylinders, the grippers and clamps of a cell.
- Four-Bar Linkage Simulator: kinematics of a planar mechanism, a first step to the arm’s.
Updated