Circular Motion

From Wiki

The circular motion command can be used to define curved paths. It is supported from CPRog/iRC and TinyCtrl V13. This article gives a short introduction and hints on how to define curves.

Defining a Circular Motion

Example: Definition of a 90° curve using target position and target angle approach

A circular path can be defined using a target position or a target angle. Each approach can be more useful or easier to use in specific situations.

Target Position

A circle can be defined by 3 points on it's outline. Defining a circle or circular curve in a robot program uses this idea as follows:

  1. Create a motion command (linear or joint) to the start point of the circle
  2. Create a circular command and define the target position ("Position 2") and an intermediate position ("Position 1").

The robot will move from to the start position, then in a circular path via position 1 to position 2. Note that position 1 defines the direction in which the robot moves around the circle's center.

Example (90° motion, radius 50mm):

  • Start position (linear command): 50mm, 200mm, 0mm
  • Position 1: 64.7mm, 235.4mm, 0mm
  • Position 2: 100mm, 250mm, 0mm
  • End position: Position 2

Warning: Never use a circular command as first command of your program and be careful with variable motion. If the circular motion starts at an unexpected position the circle can become very big or small.

Target Angle

Alternatively the end position can be defined by a target angle. This may be easier to calculate in some cases and it can be used to move further than a full circle.

  1. Define a circle as explained above. Position 1 and 2 can be any points on the circle.
  2. Set the target angle in the "End Position" section.

Hint: If your circle is aligned to the cartesian axes you easily calculate position 1 and 2 at 90° and 180° by first calculating the center of the circle and adding/subtracting the radius along each axis. Then set the target angle as desired.

Example (90° motion, radius 50mm):

  • Center 100mm, 200mm, 0mm
  • Start position (linear command): 50mm, 200mm, 0mm
  • Position 1: 100mm, 250mm, 0mm
  • Position 2: 150mm, 200mm, 0mm
  • End Position: Angle = 90°

Orientation and External Axes

To rotate the tool enter the target orientation. Warning: The robot kinematic will choose the shortest rotation direction. This may lead to joint limit errors or the direction swapping if the rotation is 180° or more.

To move external axes enter their target positions.

Variable Positions

The positions can be defined as constants or via variables. The latter can be used to dynamically define the path by camera or PLC data. Please keep the hints above on variable positions and orientations in mind and test your program well.

The circular command uses 2 variables. One defines position 1 only, the other defines position 2, as well as the target orientation and external axes.

Smoothing and Combined Paths

The circular motion is compatible to the linear motion so that a combined path without stops can be defined. Smoothing can be used to smooth discontinuities between commands. E.g. if a circular curve is followed by a linear motion or another curve and the commands are not perfectly aligned smoothing will cut some distance off each motion command and add a smooth curve inbetween. A higher value of the smoothing parameter will cut more, which can lead to the circular and linear path being followed less precisely. A value of 0 will disable smoothing, in this case the robot will shortly stop before continuing the next command.

Hint: Use a low smoothing value of e.g. 1% to avoid stopping while keeping the motion precise.

Please note: Smoothing is limited by the value of the "LookAhead" parameter in the robot configuration. This means that after X succeeding commands the smoothing will ignored for one command. If you define a long path you may notice this as the robot stopping each X commands.

Example Programs

This package contains example programs that show how the circular motion command can be used: File:CircularMotionExamples.zip. You can run them in the iRC simulation.