Motion, Paths and Programming

Joint and linear moves, velocity profiles, blending, teach, lead-through and offline programming, and robot languages.

Move types

MovePath of the toolUse it forWatch out for
Joint move (PTP, MoveJ)A curve: every joint moves together and arrives at the same timeFree-space travel; the fastest and smoothestThe 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 orientationApproaches, welding seams, dispensing, anything where the path mattersSingularities and joint limits can stop it
Circular move (MoveC, CIRC)An arc through a start, a via point and an endArcs, round parts, smooth cornersThe via point must not be collinear with the other two
Spline or path moveA smooth curve through many pointsComplex seams and scanning pathsMany points to teach or generate
Relative and offset movesA displacement from a point or in the tool frameApproach and retreat, pallet patternsBe clear which frame the offset is in
Force or search movesMove until contact, or follow a forceInsertion, finding a surfaceNeeds 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.

Joint move against linear move02004006008000200400600800x (mm)y (mm)ABjoint movelinear moveStraight-line length 595 mmLargest sideways error of thejoint move: 82 mmGray arms: start, middle, endof the joint move.
The same two end points reached by a joint move (curved) and a linear move (straight), for a two-link arm drawn at three instants of the joint move.

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)

Velocity profiles: the speed limit is rarely reached on short moves0.00.20.40.60.802505007501000time (s)tool speed (mm/s)speed limit 1000 mm/s600 mm: 0.85 s100 mm: 0.32 s, peak 632 mm/sacceleration 4000 mm/s2
Speed against time for a long move that reaches the speed limit and a short move that does not.

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 %.
MoveProfilePeak speedTimeAverage speed
25 mmtriangle316 mm/s0.16 s158 mm/s
50 mmtriangle447 mm/s0.22 s224 mm/s
100 mmtriangle632 mm/s0.32 s316 mm/s
200 mmtriangle894 mm/s0.45 s447 mm/s
400 mmtrapezoid1 000 mm/s0.65 s615 mm/s
800 mmtrapezoid1 000 mm/s1.05 s762 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

MethodHow it worksGood forLimits
Teach pendantJog the robot to each point and record it; add logic in the pendant’s program editorSimple tasks, touching up points, commissioningSlow for complex work; the robot is out of production while you teach
Lead-through (hand guiding)Move the arm by hand and recordCobots, quick set-up, frequent changesAccuracy depends on the operator; limited logic
Offline programming (OLP)Build the program on a 3D model of the cell, simulate, transferComplex paths, high-mix, big parts (welding, painting), checking reach and collisionsNeeds a calibrated model and cell; the robot still needs touch-up
Block or graphical programmingDrag and drop actions on a screenOperators and simple applicationsLimited for complex logic
PLC-driven motionMove commands from a PLC (for example PLCopen function blocks)Cells where the PLC runs everythingNot all robots support it; limited path features
External control (ROS, SDK, real-time interface)A PC sends targets or trajectories to the robotResearch, vision-guided and adaptive workSafety and timing are your responsibility (see Robotics Tools)
Task-level and no-code toolsDescribe the task (pick this, place there); the software plansStandard applications such as palletizingFit 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)LanguageA linear move to a point (illustrative)
ABBRAPIDMoveL pPick, v500, z10, tGripper\WObj:=wFixture;
FANUCTP / KarelL P[1] 500mm/sec CNT10
KUKAKRLLIN XPick C_DIS
YaskawaINFORMMOVL P001 V=500 PL=1
Universal RobotsURScriptmovel(p_pick, a=1.2, v=0.5, r=0.01)
Epson, Denso, MitsubishiSPEL+, PacScript, MELFA BASICSimilar 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

FaultWhat a good program does
No part at the pickWait with a timeout, signal the PLC, go to a safe point, resume when the part arrives
Grip not confirmedRetry once or twice (open, move slightly, close), then raise a fault; never carry on without the part
Part droppedStop, signal, and let an operator or a recovery routine clear it; do not blindly repeat the move
Place position blockedSkip to the next position or wait; record the event
Communication lostStop safely, hold outputs in a safe state, and report
Emergency stop or protective stopOn 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

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.