The second generation languages represent the current state of the art in textual languages. In this and the following sections of this chapter, we will describe the features that characterize the second generation languages in use today for robotics.
Some of these features, of course, are applicable to first generation languages as well, but our discussion will include the more advanced capabilities that usually go beyond the first generation.
The language must be designed to operate with a robot system as illustrated in Fig. It must be able to support the programming of the robot, control of the robot manipulator, and interfacing with peripherals in the work cell (e.g., sensors, and equipment).
It should also support data communications with other computer systems in the factory.
In using the textual languages, the programmer has available a CRT monitor, an alphanumeric keyboard, and a teach pendant. There should also be some means of storing the programs, either on magnetic tape or disk.
Using the language requires that there be some mechanism that permits the user to determine whether to write a new program, edit an existing program, execute (run) a program, or perform some other function.
This mechanism is called an operating system, a term used in computer science to describe the software that supports the internal operation of the computer system.
The purpose of the operating system is to facilitate the operation of the computer by the user and to maximize the performance and efficiency of the system and associated peripheral devices.
The definition and purpose of the operating system for a robot language are similar.
A robot language operating system contains the following three basic modes of operation:
- Monitor mode
- Run mode
- Edit mode
The monitor mode is used to accomplish overall supervisory control of the system. It is sometimes referred to as the supervisory mode.
In this mode, the user can define locations in space using the teach pendant, set the speed control for the robot, store programs, transfer programs from storage back into control memory, or move back and forth between the other modes of operation such as edit or run.
The run mode is used for executing a robot program. In other words, the robot is performing the sequence of instructions in the program during the run mode.
When testing a new program in the run mode, the user can typically employ debugging procedures built into the language to help in developing a correct program.
For example, the program may call for the manipulator to exceed its joint limits in moving from one point named in the program to the next. Since the robot cannot do this, an error message would print out on the monitor and the robot would stop.
This condition can be corrected by returning to the edit mode and adjusting the program or by redefining the point. Most modern robot languages permit the user to cross back into the monitor or edit modes while the program is being executed, so that another program can be written.
In some cases, it is even possible to edit the current program although there are inherent dangers in doing this.
The edit mode provides an instruction set that allows the user to write new programs or to edit existing programs.
Although the operation of the editing mode differs from one language system to another, the kinds of editing operations that can be performed include the writing of new lines of instructions in sequence, deleting or making changes to existing instructions, and inserting new lines in a program.
As with a computer programming language, the robot language program is processed by the operating system using either an interpreter or a compiler.
An interpreter is a program in the operating system that executes each instruction of the source program (in our case, the source program is the user’s robot language program) one at a time.
VAL is an example of a robot language that is processed by an interpreter. A compiler is a program in the operating system that passes through the entire source program and pretranslates all of the instructions into machine level code that can be read and executed by the robot controller.
MCL is an example of a robot language that is processed by a compiler. Compiled programs usually result in faster execution times.
On the other hand, a source program that is processed by an interpreter can be edited more readily since recompilation of the entire program is not required.
Robot Language Elements and Functions
Let us examine some of the basic elements and functions that should be incorporated into the language to enable the robot to perform tasks of medium to high complexity.
We will organize our discussion into the following headings:
- Constants, variables, and other data objects
- Motion commands
- End effector and sensor commands
- Computations and operations
- Program control and subroutines
- Communications and data processing
- Monitor mode commands
The following sections will discuss these basic elements of second generation robot languages. Where appropriate we will illustrate elements using vocabulary statements from actual robot languages.
In those cases, we will usually identify the language. In other cases, we will invent vocabulary words and statements that are composites of more than a single language.
There is a risk in these sections that the text will read like the programmer’s manual for some robot language. We ask the reader’s indulgence if our descriptions seem like this.