Motion, Paths and Programming
Joint and linear moves, velocity profiles, blending, teach, lead-through and offline programming, and robot languages.
Move types
| Move | Path of the tool | Use it for | Watch out for |
|---|---|---|---|
| Joint move (PTP, MoveJ) | A curve: every joint moves together and arrives at the same time | Free-space travel; the fastest and smoothest | The path in space is not a straight line, so it can sweep through an obstacle |
| Linear move (MoveL, LIN) | A straight line at a controlled tool speed and orientation | Approaches, welding seams, dispensing, anything where the path matters | Singularities and joint limits can stop it |
| Circular move (MoveC, CIRC) | An arc through a start, a via point and an end | Arcs, round parts, smooth corners | The via point must not be collinear with the other two |
| Spline or path move | A smooth curve through many points | Complex seams and scanning paths | Many points to teach or generate |
| Relative and offset moves | A displacement from a point or in the tool frame | Approach and retreat, pallet patterns | Be clear which frame the offset is in |
| Force or search moves | Move until contact, or follow a force | Insertion, finding a surface | Needs a force sensor or motor-current limits (see Vision, Calibration and Accuracy) |
Joint moves and linear moves
A joint move interpolates the joint angles from the start values to the end values, so the tool follows whatever curve results. A linear move interpolates the tool position along a line and solves the inverse kinematics at every step (see Coordinate Frames and Kinematics). The controller does this about every 8 ms, so a linear move involves 125 inverse-kinematics solutions a second.
Worked example: how far does a joint move wander?
- A two-link arm (L1 = 400 mm, L2 = 350 mm) moves from A (560, 120) to B (160, 560), a straight-line distance of 595 mm.
- Interpolating the joint angles gives the orange path. At its worst it is 82 mm to the side of the straight line (14 % of the move length).
- For travel in free space this is harmless and fastest. For an approach to a part or a pass between obstacles, check the swept path in simulation, or use a linear move to the last few centimeters.
- A linear move is not “better”: it is slower, can fail near singularities, and the joints may have to move far more than the tool does.
Speed profiles
A robot cannot jump to speed: it is limited by the acceleration its motors and gearboxes can deliver (see Payload, Inertia, Speed and Cycle Time). The simplest profile is a trapezoid: accelerate at a, cruise at v, decelerate at a. If the move is too short to reach cruising speed, the profile is a triangle. Real controllers round the corners of the profile (S-curve, jerk limiting) to reduce vibration, at a small cost in time.
Trapezoid (D ≥ v² ÷ a): T = D ÷ v + v ÷ a Triangle (D < v² ÷ a): T = 2 √(D ÷ a), peak speed √(D a)
Worked example: v = 1 000 mm/s, a = 4 000 mm/s²
- The distance needed to reach top speed and stop again is v² ÷ a = 250 mm. Moves shorter than that never reach 1 000 mm/s.
- A 600 mm move is a trapezoid: T = 600 ÷ 1 000 + 1 000 ÷ 4 000 = 0.85 s, at an average speed of 706 mm/s.
- A 100 mm move is a triangle: T = 2 √(100 ÷ 4 000) = 0.32 s, peak speed only 632 mm/s, average 316 mm/s.
- For short moves, acceleration, not top speed, sets the time. Doubling the speed limit changes nothing; doubling the acceleration cuts the time by 29 %.
| Move | Profile | Peak speed | Time | Average speed |
|---|---|---|---|---|
| 25 mm | triangle | 316 mm/s | 0.16 s | 158 mm/s |
| 50 mm | triangle | 447 mm/s | 0.22 s | 224 mm/s |
| 100 mm | triangle | 632 mm/s | 0.32 s | 316 mm/s |
| 200 mm | triangle | 894 mm/s | 0.45 s | 447 mm/s |
| 400 mm | trapezoid | 1 000 mm/s | 0.65 s | 615 mm/s |
| 800 mm | trapezoid | 1 000 mm/s | 1.05 s | 762 mm/s |
Blending and stopping points
By default a robot may stop at every programmed point (a fine point). With blending (zones, radii, approximate positioning, depending on the maker) it rounds the corner without stopping, within a stated distance of the point. That saves the time of braking and accelerating, but the tool no longer passes exactly through the point.
Worked example: a square path of four 200 mm legs
- Stopping at every corner (the speed profile above on each leg): 4 × 0.45 = 1.79 s.
- Passing each corner at 600 mm/s (blended): the legs start and end at 600 mm/s except at the two ends: 1.17 s, a saving of 35 %.
- The theoretical limit, moving the whole 800 mm as one straight move, is 1.05 s; the corners make the real path slower than that.
- The price: with a 20 mm blend radius on a 90° corner the tool cuts the corner by about 8 mm. Use fine points where the tool must be accurate (a pick, a place, a weld start), and blends in free air.
- A blended point does not wait. If an output or a wait is programmed at that point, it may execute early. Use a fine point where an action has to happen at a position.
- Blending is applied by distance or by time, depending on the robot: read the manual.
- Blend in the approach, not in the final target: approach a pick through a blended point 50 to 100 mm away, then a linear move to a fine point at the part.
Ways to program
| Method | How it works | Good for | Limits |
|---|---|---|---|
| Teach pendant | Jog the robot to each point and record it; add logic in the pendant’s program editor | Simple tasks, touching up points, commissioning | Slow for complex work; the robot is out of production while you teach |
| Lead-through (hand guiding) | Move the arm by hand and record | Cobots, quick set-up, frequent changes | Accuracy depends on the operator; limited logic |
| Offline programming (OLP) | Build the program on a 3D model of the cell, simulate, transfer | Complex paths, high-mix, big parts (welding, painting), checking reach and collisions | Needs a calibrated model and cell; the robot still needs touch-up |
| Block or graphical programming | Drag and drop actions on a screen | Operators and simple applications | Limited for complex logic |
| PLC-driven motion | Move commands from a PLC (for example PLCopen function blocks) | Cells where the PLC runs everything | Not all robots support it; limited path features |
| External control (ROS, SDK, real-time interface) | A PC sends targets or trajectories to the robot | Research, vision-guided and adaptive work | Safety and timing are your responsibility (see Robotics Tools) |
| Task-level and no-code tools | Describe the task (pick this, place there); the software plans | Standard applications such as palletizing | Fit only the supported task |
- Teach points relative to a frame (see Coordinate Frames and Kinematics) so that a moved fixture needs one re-measurement.
- Simulate first for reach, collisions and cycle time, but run slowly the first time on the real robot, with the stop button in hand and the area clear.
- Use the same tool and frame data in the simulation and on the robot, or the transferred points will be off.
- Save every version with a date and a note on what changed (see Commissioning, Maintenance and Troubleshooting).
Robot languages
Every maker has its own language, but they express the same ideas: move commands with a speed and a blend, tool and frame selection, digital and analog I/O, variables, loops and conditions, subroutines, and error handling. Some controllers also support IEC 61131-3 or a Python or C++ API.
| Maker (typical) | Language | A linear move to a point (illustrative) |
|---|---|---|
| ABB | RAPID | MoveL pPick, v500, z10, tGripper\WObj:=wFixture; |
| FANUC | TP / Karel | L P[1] 500mm/sec CNT10 |
| KUKA | KRL | LIN XPick C_DIS |
| Yaskawa | INFORM | MOVL P001 V=500 PL=1 |
| Universal Robots | URScript | movel(p_pick, a=1.2, v=0.5, r=0.01) |
| Epson, Denso, Mitsubishi | SPEL+, PacScript, MELFA BASIC | Similar structure with different keywords |
The examples show the idea only; the exact syntax, units and options differ and change between versions: always use the maker’s manual.
Structuring a program
// A pick-and-place program in generic pseudo-code
MAIN:
MoveJ HOME // safe start, known configuration
LOOP
WAIT cell_ready AND part_present TIMEOUT 10s ELSE CALL ERR_NO_PART
SELECT recipe_number // the PLC chooses the product
CASE 1: CALL PICK(part_A_frame, 85) // heights and offsets as parameters
CASE 2: CALL PICK(part_B_frame, 40)
CALL PLACE(pallet_frame, layer, index)
SET cycle_done = 1; WAIT start_next = 1; SET cycle_done = 0
ENDLOOP
PICK(frame, z):
MoveJ frame + [0, 0, z + 60] BLEND 30 // approach above the part
MoveL frame + [0, 0, z] FINE // go down; fine point where the grip happens
SET gripper_close = 1; WAIT grip_ok = 1 TIMEOUT 1s ELSE CALL ERR_GRIP
MoveL frame + [0, 0, z + 60] BLEND 10 // lift straight up before any sideways move
Worked example: the approach point
A part is picked at z = 85 mm. The program approaches 60 mm above it, descends in a linear move and leaves the same way. With a speed of 500 mm/s and an acceleration of 3 000 mm/s², each 60 mm leg takes 0.28 s: two legs add 0.57 s to the cycle. A bigger approach distance is safer (it clears the part and the fixture), a smaller one is faster; choose the smallest that clears the highest obstacle by a margin, and slow the speed only for the last few millimeters.
- Teach a few key points and derive the rest by offsets in the frame or tool frame, so that changing a height means changing one number.
- Use named variables and parameters for speeds, heights and offsets, not numbers buried in move commands.
- Start and end every program at a safe “home” point in a known configuration, and let any routine be restarted from there.
- Keep logic and motion apart: a small state machine for the cell (idle, picking, placing, fault) and separate motion routines (see PLC and Logic Control).
- Comment every point (“pick, part A, 85 mm above the plate”) and keep a drawing of the cell with the point names.
Error handling and recovery
| Fault | What a good program does |
|---|---|
| No part at the pick | Wait with a timeout, signal the PLC, go to a safe point, resume when the part arrives |
| Grip not confirmed | Retry once or twice (open, move slightly, close), then raise a fault; never carry on without the part |
| Part dropped | Stop, signal, and let an operator or a recovery routine clear it; do not blindly repeat the move |
| Place position blocked | Skip to the next position or wait; record the event |
| Communication lost | Stop safely, hold outputs in a safe state, and report |
| Emergency stop or protective stop | On restart, the program must resume safely from where it stopped or return to home; avoid restarting in the middle of a move without checking the position |
- Every wait needs a timeout and a fault action; a robot waiting forever is a stopped line with no message.
- Log faults with a time and the step (see Data Logging) so that patterns show up.
- Design recovery with the operators: what do they do when the robot stops? A program they can restart without a programmer saves the shift.
Related
- Industrial Robotics: the overview of this guide.
- Payload, Inertia, Speed and Cycle Time: what limits speed and acceleration.
- Cell Design, PLC Integration and Feeding: the PLC handshake that drives the program.
- Robotics Tools: simulation, trajectories and external control.
FAQ
When should I use a joint move and when a linear move?
Use joint moves for free-space travel (fastest and smoothest) and linear moves where the tool path matters: approaches, seams and dispensing. Check joint-move paths in simulation near obstacles.
Why is my robot slower than the datasheet speed?
Short moves never reach top speed, acceleration limits dominate, payload reduces the allowed acceleration, and stopping at every point wastes time. Use blending and look at the acceleration setting.
What is the difference between a fine point and a blended point?
At a fine point the robot stops exactly at the position; at a blended point it rounds the corner within a stated distance without stopping. Use fine points where an action or accuracy is needed.
Should I program offline or on the pendant?
Pendant teaching suits simple, stable tasks. Offline programming pays for complex paths, high mix and large parts, but needs a calibrated model and some touch-up on the real cell.
References
- Robot manufacturers’ programming manuals (RAPID, KRL, Karel, INFORM, URScript) and the PLCopen motion-control specifications.
- Craig, J. J., Introduction to Robotics: Mechanics and Control, Pearson (trajectory generation); Biagiotti, L. and Melchiorri, C., Trajectory Planning for Automatic Machines and Robots, Springer.
- ISO 9787 (coordinate systems and motion nomenclature) and ISO 10218 (safety of programming and teaching modes).
Last reviewed: October 2026. Times and speeds are from simple profiles and are illustrative; controllers add smoothing and limits.
