Skip to main content

1987 | Buch

PasRo

Pascal and C for Robots

verfasst von: Dr. rer. nat. Christian Blume, Dipl.-Inform. Wilfried Jakob, John Favaro, M.S.C.S.

Verlag: Springer Berlin Heidelberg

insite
SUCHEN

Über dieses Buch

The second edition of PASRO - Pascal for Robots includes some new aspects of the PASRO development within the last two years. Besides the PASRO implementation on other computers with the help of different Pascal compilers and operating systems, one significant new development has been the implementation of the PASRO concept in the programming language C. Therefore the second edition is divided into two major parts: A. The revised and little extended "old" PASRO description of the first edition based on Pascal. B. The new PASRO/C description based on C. Of course we know that the name "PASRO/C· is a contradiction in terms, but we chose it, in order to use the well known name PASRO in future. The additional author John Favaro is respon­ sible for the PASRO/C implementation and the des~ription while Christian Blume designed the PASRO concept and implemented the original PASRO, together with Wilfried Jakob. Additional thanks are dedicated to Jan Schloen and Thomas Eppting, who helped us to implement PASRO/C. We would also like to thank all readers of the first edition, who sent us their comments and corrections. Amongst these, spe­ cial thanks to G. Macartney from the Queen's University of Bel­ fast.

Inhaltsverzeichnis

Frontmatter

General Introduction

General Introduction
Abstract
Besides the motivation for introducing a new robot language (which is discussed in the introduction to PASRO) we want to point out, that we haven’t chosen Pascal or C as programming languages, because they are particularly useful for robot programming. The reasons for using Pascal as a base for extension to robot programming are
  • From a didactic point of view, Pascal is one of the best languages for teaching and learning programming.
  • Pascal supports structured programming and top-down-design.
  • Extensions can be done by defining new data types and functions.
  • Programs are readable and Pascal is useful for programming simple and complex programs.
  • The language Pascal is implemented on many computers and especially personal computers.
Christian Blume, Wilfried Jakob, John Favaro

PASRO

Frontmatter
A.1. Introduction to PASRO
Abstract
There are many robot programming languages in use; in industrial applications as well as in research and development. However, underlying concepts differ and as yet there is no language standard or main language in sight. So why introduce a new robot programming system? PASRO (PAScal for RObots) was first designed as a teaching system for beginners, who wanted to learn about high level robot programming in a structured way (BLUME [A.1.1]). As a result:
  • PASRO is embedded in Pascal.
  • It includes the main concepts of robot programming.
  • It is very easy to use.
  • Several kinds of robot movement control are included. (Only a few industrial or scientific system have it.)
  • It can be extended and changed very easily.
Christian Blume, Wilfried Jakob, John Favaro
A.2. Basic Facilities for Robot Programming
Abstract
Industrial robots are machines whose functions can be programmed and which can be put to general use in production areas. This is not an exact definition and many numerical control (NC)-machines comply with it. To clarify the term “general use”, this presumes the following features:
  • the aibility to move a gripper or tool to any point of the working area (random positioning)
  • the choice of any orientation of the gripper or tool at a given point (random orientation)
  • to pick up and put down almost any object or tool (within physical constraints)
Christian Blume, Wilfried Jakob, John Favaro
A.3. Concept of Data
Abstract
The information a program is working on is called data, in very general term. On a basic machine level, data are represented by a sequence of binary gigits, called bits. To distinguish values associated with the same bit string, additional information is required. This is called the data type definition and describes the set of values the variable of a certain type can hold. For example, the 16 bit string
  • 0000000000110101
can be interpreted during program execution as the whole number “53” or the ASCII-character “5”. In the first case it is a variable of type INTEGER, otherwise of type CHAR.
Christian Blume, Wilfried Jakob, John Favaro
A.4. Concept of Action
Abstract
It is essential that part of a robot program deals with the execution of physical actions. That is to say that a program must not only do something with its data, but also control the robot moves and gripper actions. The traditional program flow control in Pascal is done using statements, while robot and gripper control is performed by system procedure calls.
Christian Blume, Wilfried Jakob, John Favaro
A.5. Program Structure
Abstract
Since PASRO programs are embedded in Pascal an outline of the program structure of Pascal will be given first.
Christian Blume, Wilfried Jakob, John Favaro
A.6. Input/Output
Abstract
The communication between program, user and machine is supported by PASRO in four ways:
1.
traditional Pascal-I/O, helps when working with files and/or terminals.
 
2.
I/O of PASRO standard data types, which can be done with the normal Pascal-I/O, but as one would find it hard to do so, there is a set of procedures embedded in the PASRO-system to support I/O of these data types.
 
3.
robot control, which is a special I/O, to and from the robot control unit.
 
4.
process I/O, which is done via another set of procedures, to provide a more convenient interface between the process and the program.
 
Christian Blume, Wilfried Jakob, John Favaro
A.7. Integration of Teach-In
Abstract
Currently, most industrial robots are programmed using teach-in procedures. Thereby motion points, respectively frames, are defined by positioning the robot, or robot mounted effector with its tool center point TCP (cf. section A.2.1). The programmer must direct the robot in its motions and does so by pressing specific keys of a so-called teach box. As long as a key is depressed the robot will execute a move, shown symbolically on that particular key. The programmer observes the robot and, while making frequent visual checks, adjusts its position and orientation. When the desired position is reached, another key is pressed to tell the system to store the position. Besides this on-line programming of movements, several other commands are possible:
  • velocity of the movement
  • duration of the movement
  • program pause
  • simple loops
  • simple jumps (according to external signals)
  • gripper control
  • special functions e.g. single step mode
Christian Blume, Wilfried Jakob, John Favaro
A.8. Implementation
Abstract
The PASRO programming system has ben almost entirely implemented in Pascal. Consequently, the PASRO system procedures are written in Standard Pascal and only a few parts such as the I/O to the robot control unit have been implemented in non-standard Pascal or assembler.
Christian Blume, Wilfried Jakob, John Favaro
A.9. How to Use the PASRO-System
Abstract
The the user should first of all be familar with his own Pascal system before becoming acquainted with some additional rules in order to write down a PASRO program and link it to produce an executable program.
Christian Blume, Wilfried Jakob, John Favaro
A.10. PASRO Program Examples
Abstract
Learning a programming language is not only a theoretical study but also a practical one — learning by doing — so a few program examples are given below. They have been selected to provide the following:
  • an introduction for beginners
  • a demonstration of structured programming
  • amusement
  • relevence to industrial applications
  • a combination of the advantages of Pascal and PASRO
A complete program, which is programmed with a good user interface and which contains plenty of comments, will not be less than two or more pages in length when printed out. As a result this chapter is one of the longest.
Christian Blume, Wilfried Jakob, John Favaro

PASRO/C

Frontmatter
B.1. Introduction to PASRO/C
Abstract
The C programming language has acquired an enormous amount of popularity in recent years. This popularity can be attributed to a well-balanced combination of efficiency, expressiveness and portability.
Christian Blume, Wilfried Jakob, John Favaro
B.2. Basic PASRO/C Facilities for Robot Programming
Abstract
Chapter A.2 gives a thorough introduction to the concepts underlying both PASRO and PASRO/C in a manner that is largely 1anguage-independent.
Christian Blume, Wilfried Jakob, John Favaro
B.3. Concept of Data in PASRO/C
Abstract
Programs written in C manipulate data objects, as do all computer programs. Data objects may take the form of constants, which never change, or variables, which are named and which may change their values through assignment.
Christian Blume, Wilfried Jakob, John Favaro
B.4. Concept of Action in PASRO/C
Abstract
Since C is a procedural language like Pascal, the facilities for program flow control and robot control in PASRO/C appear in the same form as in PASRO: flow control is achieved through statements in the C programs, and robot and gripper control is performed by standard PASRO/C routines.
Christian Blume, Wilfried Jakob, John Favaro
B.5. Program Structure in PASRO/C
Abstract
A program in C is essentially a collection of functions, which may be distributed across several files. A special function called “main()”, which must always be present, provides a start address for the program (see Section B.5.2 for a discussion of the start address for PASRO/C programs).
Christian Blume, Wilfried Jakob, John Favaro
B.6. Input/Output in PASRO/C
Abstract
The I/O facilities available in PASRO/C fall into the same categories as their counterparts in Pascal-based PASRO:
1.
Traditional I/O in C or, more precisely, using the Standard I/O Library. This is discussed in Section B.6.1.
 
2.
I/O of PASRO/C standard data types which is done as in their Pascal counterparts.
 
3.
robot control which is I/O with the robot and not discussed further here.
 
4.
process I/O which is done as in their Pascal counterparts.
 
Christian Blume, Wilfried Jakob, John Favaro
B.7. Integration of Teach-In in PASRO/C
Abstract
A thorough introduction to the motivation for integrating teach-in procedures into robot programming languages may be found in Chapter A.7.
Christian Blume, Wilfried Jakob, John Favaro
B.8. PASRO/C Implementation
Abstract
The PASRO/C system is almost entirely implemented in C, as it is defined in the appendix of K&R. Consequently, any standard implementation of C should be able to support PASRO/C.
Christian Blume, Wilfried Jakob, John Favaro
B.9. How to Use the PASRO/C System
Abstract
Although the rules for using PASRO/C will vary from system to system, a few guidelines can be summarized.
Christian Blume, Wilfried Jakob, John Favaro
B.10. PASRO/C Program Examples
Abstract
The following programming examples have exact counterparts in Chapter A.10 of this book. They may be studied not only as examples of programming in PASRO/C, but also as an interesting comparison of the languages Pascal and C.
Christian Blume, Wilfried Jakob, John Favaro

Appendices

Frontmatter
C.1. Summary of PASRO Procedures
Christian Blume, Wilfried Jakob, John Favaro
C.2. Predeclared PASRO and Pascal Identifiers
Christian Blume, Wilfried Jakob, John Favaro
C.3. Predefined Data Types of PASRO
Christian Blume, Wilfried Jakob, John Favaro
C.4. Pascal Syntax Diagrams
The diagrams for Letter, Digit, Identifier, Directive, UnsignedInteger, UnsigndNumber, and CharacterString describe the formation of lexical symbols from characters. The other diagrams describe the formation of syntactic construct from symbols.
Christian Blume, Wilfried Jakob, John Favaro
C.5. Summary of PASRO/C Procedures
Christian Blume, Wilfried Jakob, John Favaro
C.6. Predeclared PASRO/C and C Identifiers
Functions and constants depend on the contents of the Standard I/O Library and standard included files, so that only the most important can be listed here.
Christian Blume, Wilfried Jakob, John Favaro
C.7. Predefined Data Types of PASRO/C
Christian Blume, Wilfried Jakob, John Favaro
C.8. C Syntax Diagrams
Christian Blume, Wilfried Jakob, John Favaro
Backmatter
Metadaten
Titel
PasRo
verfasst von
Dr. rer. nat. Christian Blume
Dipl.-Inform. Wilfried Jakob
John Favaro, M.S.C.S.
Copyright-Jahr
1987
Verlag
Springer Berlin Heidelberg
Electronic ISBN
978-3-642-72848-8
Print ISBN
978-3-540-18093-7
DOI
https://doi.org/10.1007/978-3-642-72848-8