How Robots are programmed


The computer control system of a robotic arm will vary from manufacturer to manufacturer and indeed model to model, however a standard set of movement principles has  evolved that most of the major manufacturers use. Although offline programming has advanced hugely much of the programming is done using the teach pendant. This is a handheld device that allows the robot to be moved and allow the input of commands and instructions.

Movements are sometimes controlled by a joystick (ABB robots) or often by buttons on the teach pendant. While in "teach" mode the robot is limited to a maximum speed of 250mm/s to ensure safety. The robot can be moved axis at a time or can usually also be moved in a Cartesian system (x, y and z), this can be set in relation to the base of the robot, or in relation to a work piece, or to the tool on the end of the robot. This is a diagram of an ABB teach pendant:

ABB TPU2 pendant diagram.jpg

After the robot has been moved to a required position point is recorded along with any other information required such as the speed and type of movement to the point. This is done line at a time in much the same way to BASIC or C programming. Allowing multiple points to be built up, along with logic commands, such as wait, go to, if, and, etc. Each robot language has its own terms and phraseology, meaning that a program cannot be copied from one type to another, but the structures will be very similar. 

Moving or "jogging" the robot and recording positions is really the easy part. A learner-programmer can pick up a pendant and start moving the robot and modifying existing positions or "mod pozzing" very quickly. It is possible to get a little disoriented in the program, especially on the early robots where information and terminology can sometimes be unhelpful, but practice helps. 

There is also some degree of artistry in programming a robot well. Movements should be fast and flowing and ideally be economical. Likewise code should be streamlined, efficient and understandable to all. This is by no means always the case. Many automotive plants try to use very large standardized programs which are then modified to fit the applications. This often leads to huge, complex and impenetrable programs being used to control a very simple process. This picture shows an ABB pendant showing a simple program:

ABB Pendant showing program.jpg

It is important to understand the movement capabilities and limitations. Co-ordinate movement follows straight lines but requires the movement of many more axis and more computing power. Circular motions are also possible as are changing the types of positions to those that are stopped at or ones that are "flown through". The speed of each movement can also be specified, this can be slow, almost imperceptible movement to over 2.5m per second depending on robot type. However as a robot is almost always accelerating or decelerating a manufacturers quoted top speed is rarely seen in practice.  Programming robot positions and the movement between them while simple to grasp and achieve can take years to fully master. Experienced programmers will often try to use joint moves as much as possible as they are generally quicker for the robot to execute and will sometimes slow down the robots maximum permissible speed in a small move to actually increase the speed of the arm.

As important as the movement instructions are the logic functions. The robot has much the same functionality as a PLC and so can be programmed to look for inputs, chose sub routines and set outputs as required. Early robots are sometimes limited in that they can only run through one operation at a time, while most advanced robots can "multitask". Robots will often have specialized instructions that one may not have seen on a PLC. It is difficult to give an illustration of a simple program as most will involve several sub-routines depending on the process. The ABB User Manuals do have some good examples. This is a picture of a Fanuc pendant showing some simple moves:

Fanuc RJ2 pendant showing program.jpg 

The first number is the line number, the J stands for joint movement type, the P is the position number, the 100% is the speed and the FINE is the definition of the point. The movement buttons can be seen on the right of the keypad in blue. 

Part of the reason offline programming is not as popular as one would imagine is the positioning of the entire arm has to be considered. If the only concern was the location of the end of the robot then it would be straight forward. When programming via the pendant the robot calculates and stores the data for all of its axis; but CAD-CAM data typically only gives a single point in space. This means that CAD CAM only works efficiently if the complete robot can be modelled by the CAM software so the arm position can be calculated. Having said this simple CAD CAM - that is to say 2.5D milling is relatively straightforward as long as the robot is set up correctly.