MechSimulator

Robot Arm Simulator

Program a 6-axis industrial robot in 3D — Program • Kinematics • Explore • Practice • Quiz

Mode
Lesson 1 · Jogging and frames
    Display Controls
    Cell
    User Guide — Robot Arm Simulator
    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
    1. 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.
    2. 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.
    3. 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, with Offset,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

    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

    #LessonCellInstructions introduced
    1Jogging and framesThree cones, pointer(jogging only)
    2Teach and touch up pointsFour cones, pointerJ, L, FINE, UFRAME_NUM, UTOOL_NUM
    3Tool frame and user framePin and tilted fixture, cranked pointerthree-point teaching
    4Pick and placeTwo nests, gripperRO, RI, WAIT, CNT
    5Conveyor, sensor and countingConveyor and binDO, DI, R, IF, JMP, LBL
    6Palletising with offsetsFeeder and pallet, 3 × 4 × 2PR, Offset, FOR, ENDFOR
    7Machine tending with interlocksCNC machine with door and viseCALL, PULSE
    8Dispensing: circles, speed and CNTGlue plateC
    9Timeouts and error recoveryLate feederTIMEOUT, MESSAGE, END
    10Safety: AUTO, guarding and singularitiesGuarded 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.

    InstructionTP style (this simulator)ABB RAPIDKUKA KRLURScript
    Joint moveJ P[1] 50% FINEMoveJ p1, v1000, fine, tool1;PTP P1movej(p1, a=1.4, v=1.05)
    Linear moveL P[2] 250mm/sec CNT50MoveL p2, v250, z50, tool1;LIN P2 C_DISmovel(p2, a=1.2, v=0.25, r=0.05)
    Circular moveC P[3] P[4] 100mm/sec FINEMoveC p3, p4, v100, fine, tool1;CIRC P3, P4movec(p3, p4, a=1.2, v=0.1)
    Digital outputDO[1]=ONSetDO do1, 1;$OUT[1]=TRUEset_digital_out(1, True)
    Wait for inputWAIT DI[3]=ONWaitDI di3, 1;WAIT FOR $IN[3]while not get_digital_in(3): sync() end
    Number registerR[1]=R[1]+1reg1 := reg1 + 1;COUNT = COUNT + 1count = count + 1
    Call a routineCALL OPEN_DOOROpenDoor;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θdaαLimits
    1J133050−90±170°
    2J2 − 9004500−100° to 145°
    3−J3035−90−70° to 200°
    4J4400090±190°
    5−J500−90±125°
    6J68000±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.

    StepFormulaValue
    Wrist centreflange − d₆ along the tool axis(523.0, 302.0, 717.9) mm
    J1atan2(y, x)30.0°
    Reach r and height sr = √(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°
    J2atan2(r, s) − atan2(L cos(J3 + β), a₂ + L sin(J3 + β))20.0°
    J4, J5, J6from 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° value100.086.650.017.41.70.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 simulatorFANUC ROBOGUIDEABB RobotStudioRoboDK
    Runs inAny browser, no installInstalled softwareWindows desktop, plus a cloud serviceDesktop, plus a free web version
    CostFree, no accountPaid licence; academic packages for schoolsBasic features free; Premium paid (30-day trial)Free web version; paid desktop licence
    RobotsOne representative 6-axis armFANUC robotsABB robotsHundreds of models from many makers
    LanguageTP-style teach-pendant programsFANUC TP and KARELRAPIDExports to many makers’ languages
    Drives a real robotNoYesYesYes

    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.

    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

    Updated